[Bf-blender-cvs] [e85eb51a28d] master: AVI: Fix buffer overflow

Clément Foucault noreply at git.blender.org
Thu Apr 25 23:23:35 CEST 2019


Commit: e85eb51a28d604a88b079d27510d748bc9e71c68
Author: Clément Foucault
Date:   Thu Apr 25 20:40:57 2019 +0200
Branches: master
https://developer.blender.org/rBe85eb51a28d604a88b079d27510d748bc9e71c68

AVI: Fix buffer overflow

That was causing crashes when loading uncompressed avi files created with blender 2.79.

===================================================================

M	source/blender/avi/intern/avi_rgb32.c

===================================================================

diff --git a/source/blender/avi/intern/avi_rgb32.c b/source/blender/avi/intern/avi_rgb32.c
index fae255d65ba..3efa4814c70 100644
--- a/source/blender/avi/intern/avi_rgb32.c
+++ b/source/blender/avi/intern/avi_rgb32.c
@@ -71,7 +71,7 @@ void *avi_converter_to_rgb32(AviMovie *movie, int stream, unsigned char *buffer,
 
   *size = (size_t)movie->header->Height * (size_t)movie->header->Width * 4;
   buf = imb_alloc_pixels(
-      movie->header->Height, movie->header->Width, 3, sizeof(unsigned char), "torgb32buf");
+      movie->header->Height, movie->header->Width, 4, sizeof(unsigned char), "torgb32buf");
   if (!buf) {
     return NULL;
   }



More information about the Bf-blender-cvs mailing list