After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626425 - cog_virt_frame_new_convert_u8 has bogus source data
cog_virt_frame_new_convert_u8 has bogus source data
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-09 11:13 UTC by Jonathan Rosser
Modified: 2010-09-06 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonathan Rosser 2010-08-09 11:13:39 UTC
cogvirtframe.c:1874 allocates temporary storage that is never filled
cogvirtframe.c:1859 uses this as a source rather than 'src' set on the previous line

Sorry no gstreamer patch, I have my own private libcog with this applied:


--- a/cog/cogvirtframe.c
+++ b/cog/cogvirtframe.c
@@ -2170,7 +2170,7 @@ convert_u8_s16 (CogFrame * frame, void *_dest, int component, int i)
   int16_t *src;
 
   src = cog_virt_frame_get_line (frame->virt_frame1, component, i);
-  orc_convert_u8_s16 (dest, frame->virt_priv,
+  orc_convert_u8_s16 (dest, src,
       frame->components[component].width);
 }
 
@@ -2185,7 +2185,6 @@ cog_virt_frame_new_convert_u8 (CogFrame * vf)
   virt_frame = cog_frame_new_virtual (vf->domain, format, vf->width, vf->height);
   virt_frame->virt_frame1 = vf;
   virt_frame->render_line = convert_u8_s16;
-  virt_frame->virt_priv = cog_malloc (sizeof (int16_t) * vf->width);
 
   return virt_frame;
 }
Comment 1 David Schleef 2010-09-05 22:38:21 UTC
commit 62ae33d3d6e4cbfdaaf1a746a6626ff85bde7c99
Author: Jonathan Rosser <jonathan.rosser@rd.bbc.co.uk>
Date:   Sun Sep 5 15:34:13 2010 -0700

    cog: Fix cog_virt_frame_new_convert_u8()
    
    Conversion was using uninitialized data instead of source frame.
    Fixes #626425.