riff: error out on nonsensical chunk sizes instead of aborting
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 11 Feb 2009 16:39:55 +0000 (16:39 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 11 Feb 2009 16:58:18 +0000 (16:58 +0000)
commit1fedfec22018267efe34a2f42890543631ef2a24
treec746307756b4300c9ef12c821b4af22539162122
parent2a89ee9dd3d0f5832c8d178c5b593b02dfbab62e
riff: error out on nonsensical chunk sizes instead of aborting

When encountering a nonsensical chunk size such as (guint)-1, error out cleanly instead of
continuing and trying to g_memdup() 4GB of data that doesn't exist, which will either abort
in g_malloc() or crash.

Fixes #553295, crash with fuzzed AVI file.
gst-libs/gst/riff/riff-read.c