mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
midiparser: ensure variable is initialized and fix debug message access
This commit is contained in:
parent
030cf658e6
commit
b6719fe0e3
1 changed files with 3 additions and 1 deletions
|
@ -845,6 +845,8 @@ find_midi_chunk (GstMidiParse * midiparse, guint8 * data, guint size,
|
|||
{
|
||||
guint32 type;
|
||||
|
||||
*length = 0;
|
||||
|
||||
if (size < 8)
|
||||
goto short_chunk;
|
||||
|
||||
|
@ -908,7 +910,7 @@ find_midi_chunk (GstMidiParse * midiparse, guint8 * data, guint size,
|
|||
/* ERRORS */
|
||||
short_chunk:
|
||||
{
|
||||
GST_LOG_OBJECT (midiparse, "not enough data %u < %u", length + 8, size);
|
||||
GST_LOG_OBJECT (midiparse, "not enough data %u < %u", *length + 8, size);
|
||||
return FALSE;
|
||||
}
|
||||
invalid_format:
|
||||
|
|
Loading…
Reference in a new issue