mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
pnmdec: Don't crash if no valid input was parsed yet
https://bugzilla.redhat.com/show_bug.cgi?id=603771
This commit is contained in:
parent
0fba38f833
commit
147e0682b4
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ gst_pnmdec_chain_ascii (GstPnmdec * s, GstPad * src, GstBuffer * buf)
|
|||
g_scanner_destroy (scanner);
|
||||
|
||||
/* If we didn't get the whole image, handle the last byte with care. */
|
||||
if (i < target && b[bs - 1] > '0' && b[bs - 1] <= '9')
|
||||
if (i && i < target && b[bs - 1] > '0' && b[bs - 1] <= '9')
|
||||
s->last_byte = GST_BUFFER_DATA (out)[--i];
|
||||
|
||||
gst_buffer_unref (buf);
|
||||
|
|
Loading…
Reference in a new issue