GNOME Bugzilla – Bug 673436
mpegvideoparser: fix check for too small buffer
Last modified: 2012-05-21 13:32:55 UTC
Created attachment 211225 [details] [review] mpegvideoparser: fix check for too small buffer The check is against size which is removed the offset. It fails if the result is 0 or negative. Though as size is unsigned instead of becoming negative it wraps. Use an intermediate signed variable to fix the check.
Thanks. Avoided an additional variable by slightly alternative fix. [0.10] commit b69c7c3c69a6e5610e68c3b7aae3101b53b5edb0 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Mon May 21 15:24:25 2012 +0200 codecparsers: mpegvideoparser: fix buffer size check ... to mind unsigned integer wrap Based on patch by Alban Browaeys <prahal@yahoo.com> Fixes https://bugzilla.gnome.org/show_bug.cgi?id=673436 [0.11] commit e560ce0909693994e9b7e794f9904805c052ebcd Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Mon May 21 15:24:25 2012 +0200 codecparsers: mpegvideoparser: fix buffer size check ... to mind unsigned integer wrap Based on patch by Alban Browaeys <prahal@yahoo.com> Fixes https://bugzilla.gnome.org/show_bug.cgi?id=673436