diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-08-28 13:00:29 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-08-28 13:00:29 +0200 |
commit | cc272b06eefb87030bb85b686abdbc22b5ed1c34 (patch) | |
tree | 06024199184cfab43807a1fdcc2a240b9cf5ac99 /arch | |
parent | d84b175cb6948eb17f847313bf912174e2f934e1 (diff) | |
download | busybox-w32-1_19_1.tar.gz busybox-w32-1_19_1.tar.bz2 busybox-w32-1_19_1.zip |
Apply post-1.19.0 patches, bump version to 1.19.11_19_1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r-- | archival/libarchive/decompress_uncompress.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/archival/libarchive/decompress_uncompress.c b/archival/libarchive/decompress_uncompress.c index 44d894244..d1061a2bb 100644 --- a/archival/libarchive/decompress_uncompress.c +++ b/archival/libarchive/decompress_uncompress.c | |||
@@ -163,7 +163,8 @@ unpack_Z_stream(int fd_in, int fd_out) | |||
163 | 163 | ||
164 | if (insize < (int) (IBUFSIZ + 64) - IBUFSIZ) { | 164 | if (insize < (int) (IBUFSIZ + 64) - IBUFSIZ) { |
165 | rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ); | 165 | rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ); |
166 | //error check?? | 166 | if (rsize < 0) |
167 | bb_error_msg_and_die(bb_msg_read_error); | ||
167 | insize += rsize; | 168 | insize += rsize; |
168 | } | 169 | } |
169 | 170 | ||
@@ -195,6 +196,8 @@ unpack_Z_stream(int fd_in, int fd_out) | |||
195 | 196 | ||
196 | 197 | ||
197 | if (oldcode == -1) { | 198 | if (oldcode == -1) { |
199 | if (code >= 256) | ||
200 | bb_error_msg_and_die("corrupted data"); /* %ld", code); */ | ||
198 | oldcode = code; | 201 | oldcode = code; |
199 | finchar = (int) oldcode; | 202 | finchar = (int) oldcode; |
200 | outbuf[outpos++] = (unsigned char) finchar; | 203 | outbuf[outpos++] = (unsigned char) finchar; |
@@ -239,6 +242,8 @@ unpack_Z_stream(int fd_in, int fd_out) | |||
239 | 242 | ||
240 | /* Generate output characters in reverse order */ | 243 | /* Generate output characters in reverse order */ |
241 | while ((long) code >= (long) 256) { | 244 | while ((long) code >= (long) 256) { |
245 | if (stackp <= &htabof(0)) | ||
246 | bb_error_msg_and_die("corrupted data"); | ||
242 | *--stackp = tab_suffixof(code); | 247 | *--stackp = tab_suffixof(code); |
243 | code = tab_prefixof(code); | 248 | code = tab_prefixof(code); |
244 | } | 249 | } |
@@ -263,8 +268,7 @@ unpack_Z_stream(int fd_in, int fd_out) | |||
263 | } | 268 | } |
264 | 269 | ||
265 | if (outpos >= OBUFSIZ) { | 270 | if (outpos >= OBUFSIZ) { |
266 | full_write(fd_out, outbuf, outpos); | 271 | xwrite(fd_out, outbuf, outpos); |
267 | //error check?? | ||
268 | IF_DESKTOP(total_written += outpos;) | 272 | IF_DESKTOP(total_written += outpos;) |
269 | outpos = 0; | 273 | outpos = 0; |
270 | } | 274 | } |
@@ -292,8 +296,7 @@ unpack_Z_stream(int fd_in, int fd_out) | |||
292 | } while (rsize > 0); | 296 | } while (rsize > 0); |
293 | 297 | ||
294 | if (outpos > 0) { | 298 | if (outpos > 0) { |
295 | full_write(fd_out, outbuf, outpos); | 299 | xwrite(fd_out, outbuf, outpos); |
296 | //error check?? | ||
297 | IF_DESKTOP(total_written += outpos;) | 300 | IF_DESKTOP(total_written += outpos;) |
298 | } | 301 | } |
299 | 302 | ||