Date: Fri, 17 Apr 2009 00:58:44 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r191175 - head/lib/libarchive Message-ID: <200904170058.n3H0wi8q099426@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Fri Apr 17 00:58:44 2009 New Revision: 191175 URL: http://svn.freebsd.org/changeset/base/191175 Log: LZW bugfix: when we hit end-of-file, return an invalid code. Modified: head/lib/libarchive/archive_read_support_compression_compress.c Modified: head/lib/libarchive/archive_read_support_compression_compress.c ============================================================================== --- head/lib/libarchive/archive_read_support_compression_compress.c Fri Apr 17 00:57:11 2009 (r191174) +++ head/lib/libarchive/archive_read_support_compression_compress.c Fri Apr 17 00:58:44 2009 (r191175) @@ -278,7 +278,7 @@ compress_filter_read(struct archive_read *p++ = *--state->stackp; } else { ret = next_code(self); - if (ret == ARCHIVE_EOF) + if (ret == -1) state->end_of_stream = ret; else if (ret != ARCHIVE_OK) return (ret); @@ -424,7 +424,7 @@ getbits(struct archive_read_filter *self = __archive_read_filter_ahead(self->upstream, 1, &ret); if (ret == 0) - return (ARCHIVE_EOF); + return (-1); if (ret < 0 || state->next_in == NULL) return (ARCHIVE_FATAL); state->avail_in = ret;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904170058.n3H0wi8q099426>