diff options
| author | Tim Kientzle <kientzle@FreeBSD.org> | 2007-07-15 19:13:59 +0000 |
|---|---|---|
| committer | Tim Kientzle <kientzle@FreeBSD.org> | 2007-07-15 19:13:59 +0000 |
| commit | d3bb69751364bfe5fe7ad915646d5b327df9cb8b (patch) | |
| tree | 277b7c303ff4bb3a5583547383d51d714527e1c8 /lib/libarchive/archive_read_support_format_zip.c | |
| parent | 75d0856ca5bd3d33a6a3627d58bd1a3fd73b3a0c (diff) | |
Notes
Diffstat (limited to 'lib/libarchive/archive_read_support_format_zip.c')
| -rw-r--r-- | lib/libarchive/archive_read_support_format_zip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read_support_format_zip.c b/lib/libarchive/archive_read_support_format_zip.c index a3e85732bef4..80507bb4a479 100644 --- a/lib/libarchive/archive_read_support_format_zip.c +++ b/lib/libarchive/archive_read_support_format_zip.c @@ -302,7 +302,8 @@ zip_read_file_header(struct archive_read *a, struct archive_entry *entry, "Truncated ZIP file header"); return (ARCHIVE_FATAL); } - archive_string_ensure(&zip->pathname, zip->filename_length); + if (archive_string_ensure(&zip->pathname, zip->filename_length) == NULL) + __archive_errx(1, "Out of memory"); archive_strncpy(&zip->pathname, (const char *)h, zip->filename_length); (a->decompressor->consume)(a, zip->filename_length); archive_entry_set_pathname(entry, zip->pathname.s); |
