diff --git a/ChangeLog b/ChangeLog index 692f1a804b..c5d9296ba3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-14 Tim-Philipp Müller + + Patch by: Fabrizio Gennari + + * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps): + Make sure the buffer we copy into is really always big + enough, this time for real (#333488). + 2006-03-14 Tim-Philipp Müller * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps): diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index d8ad8355da..d786d8d6d3 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -577,7 +577,8 @@ gst_riff_create_video_caps (guint32 codec_fcc, if (GST_BUFFER_SIZE (palette) >= (num_colors * 4)) { /* palette is always at least 256*4 bytes */ - copy = gst_buffer_new_and_alloc (MAX (num_colors * 4, 256 * 4)); + copy = + gst_buffer_new_and_alloc (MAX (GST_BUFFER_SIZE (palette), 256 * 4)); memcpy (GST_BUFFER_DATA (copy), GST_BUFFER_DATA (palette), GST_BUFFER_SIZE (palette));