You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Package: pxz
Version: 4.999.99~beta5+gitfcfea93-1
Severity: important
Dear Maintainer,
pxz seems to ignore errors when writing to the temporary output
files used by the parallel compression threads, and silently
creates a corrupted output file.
to reproduce the bug (by using an extremely small /tmp dir, and
the bash builtin random number generator as a data source):
if you use strace instead of ltrace, you can see the actual ENOSPC error:
# RANDOM=0; while [[ true ]]; do echo $RANDOM; done | dd bs=1M iflag=fullblock count=4 | strace -s0 -f -o trace pxz -T16 -f > out.bin.xz
# grep 'write.* = -1' trace
32241 write(3, ""..., 28672) = -1 ENOSPC (No space left on device)
32241 write(3, ""..., 4096) = -1 ENOSPC (No space left on device)
32241 write(3, ""..., 4096) = -1 ENOSPC (No space left on device)
32241 write(3, ""..., 4096) = -1 ENOSPC (No space left on device)
...
looking at pxz's source in the git repository, the error
checking after some fwrite() calls is erroneous:
https://github.com/jnovy/pxz/blob/fcfea93/pxz.c#L391
https://github.com/jnovy/pxz/blob/fcfea93/pxz.c#L408
if ( !fwrite(mo, 1, BUFFSIZE - strm.avail_out, ftemp[p]) ) {
error(EXIT_FAILURE, errno, "writing to temp file failed");
}
this was originally reported as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813959 by jozsef imrek [email protected]
Package: pxz
Version: 4.999.99~beta5+gitfcfea93-1
Severity: important
Dear Maintainer,
pxz seems to ignore errors when writing to the temporary output
files used by the parallel compression threads, and silently
creates a corrupted output file.
to reproduce the bug (by using an extremely small /tmp dir, and
the bash builtin random number generator as a data source):
observe the corrupted output file:
also observe the failed writes (where the number of bytes to
write out is not equal to the number of bytes actually written):
if you use strace instead of ltrace, you can see the actual ENOSPC error:
looking at pxz's source in the git repository, the error
checking after some fwrite() calls is erroneous:
it should be at least
just like at other parts of the program.
The text was updated successfully, but these errors were encountered: