[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#686502: pxz produces archives broken for busybox's unxz



On Fri, 2012-12-21 at 17:13 +0400, Michael Tokarev wrote:
> 21.12.2012 17:06, Abou Al Montacir wrote:
> > On Thu, 2012-12-20 at 23:08 +0100, Bastian Blank wrote:
> >> On Thu, Dec 20, 2012 at 10:42:41PM +0100, Abou Al Montacir wrote:
> >>> Can you please test the attached patch
> >>
> >> How does it implement stream padding?
> >
> > Hi Bastian,
> >
> > As it is implemented, it will iterate until end of stream, but I did not
> > test this particular case.
> 
> Actually it is not:
> 
> +			if (iobuf.in_pos == iobuf.in_size) {
> +				break;
> +			} else {
> 
> iobuf is what we've in memory.  We may've read some data which
> ends in buffer exactly at the end of the stream.  There might
> be next stream coming, but for it we may need to read a few
> more bytes first...  At least if I read the code correctly.
> 
> It is sorta like testing if we reached end of file by testing
> whenever we're at the end of stdio buffer.

Hi Michael,

Good catch! I'll fix that by replacing that break by continue, so it
will read on next iteration and will break for end of file.

I'll submit a new patch soon.

Cheers,

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: