diff options
author | Remi Collet <remi@php.net> | 2013-12-30 07:35:30 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2013-12-30 07:35:30 +0100 |
commit | 0a950a05005f94e56bd2a42b99a0961db86952db (patch) | |
tree | 3949553a3f889947795b007df4776643b153da55 /ext/zip/lib/zip_add_entry.c | |
parent | 5a756afcf14fada75f6ed8052cd97924dd229ed8 (diff) | |
download | php-git-0a950a05005f94e56bd2a42b99a0961db86952db.tar.gz |
Sync with pecl/zip 1.12.4dev
- update bunled libzip to 0.11.2
- expose zip_file_set_external_attributes + zip_file_get_external_attributes
with new methods:
ZipArchive::setExternalAttributesName
ZipArchive::setExternalAttributesIndex
ZipArchive::getExternalAttributesName
ZipArchive::getExternalAttributesIndex
Diffstat (limited to 'ext/zip/lib/zip_add_entry.c')
-rw-r--r-- | ext/zip/lib/zip_add_entry.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/zip/lib/zip_add_entry.c b/ext/zip/lib/zip_add_entry.c index 3a7e2ccbe9..5cbc9574ad 100644 --- a/ext/zip/lib/zip_add_entry.c +++ b/ext/zip/lib/zip_add_entry.c @@ -49,7 +49,8 @@ _zip_add_entry(struct zip *za) if (za->nentry+1 >= za->nentry_alloc) { struct zip_entry *rentries; zip_uint64_t nalloc = za->nentry_alloc + 16; - rentries = (struct zip_entry *)realloc(za->entry, sizeof(struct zip_entry) * nalloc); + /* TODO check for overflow */ + rentries = (struct zip_entry *)realloc(za->entry, sizeof(struct zip_entry) * (size_t)nalloc); if (!rentries) { _zip_error_set(&za->error, ZIP_ER_MEMORY, 0); return -1; |