Skip to content

Commit

Permalink
Fix CVE-2015-2331 in libzip
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Sep 21, 2015
1 parent 015dfe0 commit 3614547
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions shlr/zip/zip/zip_dirent.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ _zip_cdir_new(zip_uint64_t nentry, struct zip_error *error)
return NULL;
}

if (nentry == 0)
if (nentry == 0) {
cd->entry = NULL;
else if ((cd->entry=(struct zip_entry *)malloc(sizeof(*(cd->entry))*nentry)) == NULL) {
} else if ((nentry > SIZE_MAX/sizeof(*(cd->entry))) || (cd->entry=(struct zip_entry *)malloc(sizeof(*(cd->entry))*(size_t)nentry)) == NULL) {
_zip_error_set(error, ZIP_ER_MEMORY, 0);
free(cd);
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion sys/ios-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PREFIX="/usr"
#)
#fi
case "$1" in
arm|armv7)
''|arm|armv7)
CPU=armv7
shift
;;
Expand Down

0 comments on commit 3614547

Please sign in to comment.