diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2014-10-01 00:53:59 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-10-01 00:53:59 +0100 |
commit | 3953b8e4193789068a13c41fc0a022a4d29341f7 (patch) | |
tree | 4cd9bad76425506215fe9e79d97b25b9cd21c322 /ext/fluidsynth | |
parent | cc3ca17f4c049f419c45defe3f87197d0df4b1c2 (diff) | |
download | gstreamer-plugins-bad-3953b8e4193789068a13c41fc0a022a4d29341f7.tar.gz |
fluiddec: don't crash on 0-sized input buffers
https://bugzilla.gnome.org/show_bug.cgi?id=737658
Diffstat (limited to 'ext/fluidsynth')
-rw-r--r-- | ext/fluidsynth/gstfluiddec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/fluidsynth/gstfluiddec.c b/ext/fluidsynth/gstfluiddec.c index 6b404aff4..24b3566c0 100644 --- a/ext/fluidsynth/gstfluiddec.c +++ b/ext/fluidsynth/gstfluiddec.c @@ -396,6 +396,9 @@ handle_buffer (GstFluidDec * fluiddec, GstBuffer * buffer) gst_buffer_map (buffer, &info, GST_MAP_READ); + if (info.size == 0) + goto done; + event = info.data[0]; switch (event & 0xf0) { @@ -461,6 +464,9 @@ handle_buffer (GstFluidDec * fluiddec, GstBuffer * buffer) break; } } + +done: + gst_buffer_unmap (buffer, &info); } |