Hi. Patch attached.
Einar
From 0533a3117e8e36fb33f6a6f1a5db493a40979c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Einar=20R=C3=BCnkaru?= <eina...@smail.ee> Date: Thu, 22 May 2014 22:34:01 +0300 Subject: [PATCH] Fixed zeroing frame data in VFrame::clear_frame() Fixed buffer overflow while clearing YUV420P buffer. Use calculate_data_size for calculating the buffer size. Replaced deprecated bzero with memset. --- guicast/vframe.C | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/guicast/vframe.C b/guicast/vframe.C index b9de1bc..0ec29c0 100644 --- a/guicast/vframe.C +++ b/guicast/vframe.C @@ -595,10 +595,6 @@ int VFrame::clear_frame() case BC_COMPRESSED: break; - case BC_YUV420P: - bzero(data, h * w * 2); - break; - case BC_YUV888: ZERO_YUV(3, unsigned char, 0xff); break; @@ -616,7 +612,7 @@ int VFrame::clear_frame() break; default: - bzero(data, h * bytes_per_line); + memset(data, 0, calculate_data_size(w, h, bytes_per_line, color_model)); break; } return 0; -- 1.7.9.5
_______________________________________________ Cinelerra mailing list Cinelerra@skolelinux.no https://lists.skolelinux.org/listinfo/cinelerra