From 07aed404cfb2759f97c60b9f64d8a9392dabaf1a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 14 Jan 2018 23:26:31 +0100 Subject: Fix buffer overflow vulernability in thumbnail file reading. Fixes CVE-2017-2908 from T52924. Differential Revision: https://developer.blender.org/D3001 --- source/blender/makesdna/intern/dna_genfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/intern') diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 181d01e04fc..dec93f97c6c 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -173,7 +173,9 @@ void DNA_sdna_free(SDNA *sdna) MEM_freeN(sdna->structs); #ifdef WITH_DNA_GHASH - BLI_ghash_free(sdna->structs_map, NULL, NULL); + if (sdna->structs_map) { + BLI_ghash_free(sdna->structs_map, NULL, NULL); + } #endif MEM_freeN(sdna); -- cgit v1.2.3