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 639674 - parse-launch: improve parsing resilience (for escapes at end of string)
parse-launch: improve parsing resilience (for escapes at end of string)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.33
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-16 14:46 UTC by Miguel Angel Cabrera Moya
Modified: 2011-01-24 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for the bug report (865 bytes, patch)
2011-01-16 14:48 UTC, Miguel Angel Cabrera Moya
committed Details | Review

Description Miguel Angel Cabrera Moya 2011-01-16 14:46:10 UTC
When the last character of a property value is a backslash
the unescaping code reads one byte pass the end of the string.

To reproduce it execute:
python -c 'import gst;gst.parse_launch("filesrc location=x\\")'
Comment 1 Miguel Angel Cabrera Moya 2011-01-16 14:48:15 UTC
Created attachment 178441 [details] [review]
Fix for the bug report
Comment 2 Tim-Philipp Müller 2011-01-24 14:25:50 UTC
Fixed it a bit differently, to make the problem/intention clearer:

commit bc066cf2ca3132da350b7d6e5ee620e8120c1006
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Mon Jan 24 14:22:27 2011 +0000

    tests: add unit test for read-beyond-end-of-string bug
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639674

commit d709f569ba8a598d1c0b8d86963218112581cd33
Author: Miguel Angel Cabrera Moya <madmac2501@gmail.com>
Date:   Mon Jan 24 14:16:37 2011 +0000

    parse-launch: don't read past end of string if last character is an escape char
    
    When the last character of a property value is a backslash
    the unescaping code reads one byte pass the end of the string.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639674