From 915ee95ad3d7ea7679d5ba61881fe113faf0af0a Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 30 Nov 2017 09:12:41 +0100 Subject: [PATCH] Fx nullptr dereference. --- contrib/zip/src/miniz.h | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h index 935ee3d5f..56c7e8184 100644 --- a/contrib/zip/src/miniz.h +++ b/contrib/zip/src/miniz.h @@ -3030,6 +3030,7 @@ static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, mz_ static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, mz_zip_array *pArray, const void *pElements, size_t n) { + if (pElements==NULL) return MZ_FALSE; size_t orig_size = pArray->m_size; if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) return MZ_FALSE; memcpy((mz_uint8*)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size); return MZ_TRUE;