AVI: Fix buffer overflow
authorClément Foucault <foucault.clem@gmail.com>
Thu, 25 Apr 2019 18:40:57 +0000 (20:40 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Thu, 25 Apr 2019 21:23:26 +0000 (23:23 +0200)
That was causing crashes when loading uncompressed avi files created with blender 2.79.

source/blender/avi/intern/avi_rgb32.c

index fae255d..3efa481 100644 (file)
@@ -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;
   }