mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
matroska: fix check for amount of data to read
History shows length==0 should set data to NULL and return, so we do that too instead of trying to read nothing. Coverity 206205
This commit is contained in:
parent
46a39bdd4f
commit
457712b933
1 changed files with 1 additions and 1 deletions
|
@ -377,7 +377,7 @@ gst_ebml_read_bytes (GstEbmlRead * ebml, guint32 * id, const guint8 ** data,
|
|||
return GST_FLOW_ERROR; /* FIXME: do proper error handling */
|
||||
|
||||
*data = NULL;
|
||||
if (G_LIKELY (length >= 0)) {
|
||||
if (G_LIKELY (length > 0)) {
|
||||
if (!gst_byte_reader_get_data (gst_ebml_read_br (ebml), length, data))
|
||||
return GST_FLOW_PARSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue