diff --git a/shlr/zip/zip/zip_dirent.c b/shlr/zip/zip/zip_dirent.c index 392ef2fc31..311b42b5f8 100644 --- a/shlr/zip/zip/zip_dirent.c +++ b/shlr/zip/zip/zip_dirent.c @@ -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; diff --git a/sys/ios-sdk.sh b/sys/ios-sdk.sh index 5bab9ebcb3..f8b8e7b967 100755 --- a/sys/ios-sdk.sh +++ b/sys/ios-sdk.sh @@ -13,7 +13,7 @@ PREFIX="/usr" #) #fi case "$1" in -arm|armv7) +''|arm|armv7) CPU=armv7 shift ;;