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 572256 - gst/avi/gstavidemux.c: Alignment trap in gst_avi_demux_parse_odml() line 1270 (from git)
gst/avi/gstavidemux.c: Alignment trap in gst_avi_demux_parse_odml() line 1270...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.21
Other Linux
: Normal major
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-18 10:51 UTC by Antoine Pelisse
Modified: 2009-02-22 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Antoine Pelisse 2009-02-18 10:51:06 UTC
Hi,
I am running gstreamer-0.10.21 with gst-plugin-good-0.10.10 on a da-vinci dm6446 platform (arm9 processor).
I have had a crash (actually it crashes every time) on this line (in gst_avi_demux_parse_odml()):
       dmlh.totalframes = GUINT32_FROM_LE (_dmlh->totalframes);
It seems like _dmlh is rounded to 2 while acceeding an integer must have a rounded to 4 address.
Replacing this line by:
        dmlh.totalframes = GST_READ_UINT32_LE (&_dmlh->totalframes);
fixes the problem (GST_READ_UINT32_LE reads bytes by bytes and is thus correct on unaligned address).

Is it the correct way to fix it or is there some other issue in my setup ?
Comment 1 Sebastian Dröge (slomo) 2009-02-18 12:33:24 UTC
Yes, that's the correct way to fix it. I'll commit this change after -good 0.10.14 is released, thanks :)
Comment 2 Sebastian Dröge (slomo) 2009-02-22 17:34:47 UTC
Fixed in GIT (and another alignment issue). If you find more issues like this please report them :)

commit 6756475fd3af29844a77bcb08d9943070daf6f9e
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sun Feb 22 18:32:02 2009 +0100

    avidemux: Fix alignment issues by using GST_READ_*
    
    Reading integers from random memory addresses will result
    in SIGBUS on some architectures if the memory address
    is not correctly aligned. This can happen at two
    places in avidemux so we should use GST_READ_UINT32_LE
    and friends here. Fixes bug #572256.