diff --git a/ChangeLog b/ChangeLog index 608187fe3f..609c4b22d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-11-21 Tim-Philipp Müller + + * gst/typefind/gsttypefindfunctions.c: (mp3_type_find_at_offset): + Avoid integer underflow when the found probability for mp3 is + smaller than the 'penalty' we subtract if there's not a clean + mp3 header sync at offset 0. + 2006-11-21 Stefan Kost * docs/libs/gst-plugins-base-libs-sections.txt: diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 376ef4f571..7b5bc37616 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -726,7 +726,7 @@ mp3_type_find_at_offset (GstTypeFind * tf, guint64 start_off, GST_MP3_TYPEFIND_TRY_HEADERS / GST_MP3_TYPEFIND_TRY_SYNC; if (!headerstart - && ((probability - GST_MP3_WRONG_HEADER) > GST_TYPE_FIND_MINIMUM)) + && probability > (GST_TYPE_FIND_MINIMUM + GST_MP3_WRONG_HEADER)) probability -= GST_MP3_WRONG_HEADER; if (probability < GST_TYPE_FIND_MINIMUM) probability = GST_TYPE_FIND_MINIMUM;