mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
pnmdec: Fix scanner memory leak
For corrupted files, scanner memory is being leaked. https://bugzilla.gnome.org/show_bug.cgi?id=759522
This commit is contained in:
parent
319d9efb2d
commit
7c65a5ccd5
1 changed files with 1 additions and 0 deletions
|
@ -190,6 +190,7 @@ gst_pnmdec_parse_ascii (GstPnmdec * s, const guint8 * b, guint bs)
|
|||
case G_TOKEN_INT:
|
||||
if (i == target) {
|
||||
GST_DEBUG_OBJECT (s, "PNM file contains too much data.");
|
||||
g_scanner_destroy (scanner);
|
||||
goto drop_error;
|
||||
}
|
||||
outdata[i++] = scanner->value.v_int;
|
||||
|
|
Loading…
Reference in a new issue