diff options
author | Tim Kientzle <kientzle@gmail.com> | 2009-02-03 13:21:12 -0500 |
---|---|---|
committer | Tim Kientzle <kientzle@gmail.com> | 2009-02-03 13:21:12 -0500 |
commit | cf67ef631e1e1dbf27b6f758e0534b9e9c0ff3fa (patch) | |
tree | 988cfef6a06cf658f5f1612ea1795cbaa4da66f8 /libarchive/archive_read_support_format_cpio.c | |
parent | a923b5a96048a48059d329e907d5359966f5eda8 (diff) | |
download | libarchive-cf67ef631e1e1dbf27b6f758e0534b9e9c0ff3fa.tar.gz |
GCC on 64-bit Linux has 32-bit int and 64-bit size_t; not
taking this into account led to a stack overwrite that broke
most of the new decompression code on this platform.
SVN-Revision: 539
Diffstat (limited to 'libarchive/archive_read_support_format_cpio.c')
-rw-r--r-- | libarchive/archive_read_support_format_cpio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libarchive/archive_read_support_format_cpio.c b/libarchive/archive_read_support_format_cpio.c index 622bb679..56247dd1 100644 --- a/libarchive/archive_read_support_format_cpio.c +++ b/libarchive/archive_read_support_format_cpio.c @@ -331,7 +331,8 @@ find_newc_header(struct archive_read *a) { const void *h; const char *p, *q; - size_t skip, bytes, skipped = 0; + size_t skip, skipped = 0; + ssize_t bytes; for (;;) { h = __archive_read_ahead(a, sizeof(struct cpio_newc_header), &bytes); @@ -465,7 +466,8 @@ find_odc_header(struct archive_read *a) { const void *h; const char *p, *q; - size_t skip, bytes, skipped = 0; + size_t skip, skipped = 0; + ssize_t bytes; for (;;) { h = __archive_read_ahead(a, sizeof(struct cpio_odc_header), &bytes); |