mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	guard memcpy when n == 0 because buffer may be NULL
This commit is contained in:
		| @@ -351,6 +351,7 @@ static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, mz_zi | ||||
|     size_t orig_size = pArray->m_size; | ||||
|     if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) | ||||
|         return MZ_FALSE; | ||||
|     if (n > 0) | ||||
|         memcpy((mz_uint8 *)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size); | ||||
|     return MZ_TRUE; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user