[FFmpeg-cvslog] swscale-test: fix stack overread.
Ronald S. Bultje
git at videolan.org
Sat Jan 14 02:53:46 CET 2012
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Thu Jan 12 15:38:37 2012 -0800| [06b0246da07e7c9d95476b35275a63cd6dbc300c] | committer: Ronald S. Bultje
swscale-test: fix stack overread.
Fixes problems in swscale-test where it gives a 3-member array to a
function expecting a 4-member array.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06b0246da07e7c9d95476b35275a63cd6dbc300c
---
libswscale/swscale-test.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libswscale/swscale-test.c b/libswscale/swscale-test.c
index 7ea01a6..3497dff 100644
--- a/libswscale/swscale-test.c
+++ b/libswscale/swscale-test.c
@@ -337,8 +337,8 @@ int main(int argc, char **argv)
enum PixelFormat srcFormat = PIX_FMT_NONE;
enum PixelFormat dstFormat = PIX_FMT_NONE;
uint8_t *rgb_data = av_malloc(W * H * 4);
- uint8_t *rgb_src[3] = { rgb_data, NULL, NULL };
- int rgb_stride[3] = { 4 * W, 0, 0 };
+ uint8_t *rgb_src[4] = { rgb_data, NULL, NULL, NULL };
+ int rgb_stride[4] = { 4 * W, 0, 0, 0 };
uint8_t *data = av_malloc(4 * W * H);
uint8_t *src[4] = { data, data + W * H, data + W * H * 2, data + W * H * 3 };
int stride[4] = { W, W, W, W };
More information about the ffmpeg-cvslog
mailing list