Commit 9d3dbd65 authored by Seán de Búrca's avatar Seán de Búrca Committed by Sebastian Dröge

matroskademux: Fix off-by-one in validation of UTF-8

https://bugzilla.gnome.org/show_bug.cgi?id=707933
parent 9f4a8ccd
......@@ -3007,7 +3007,7 @@ gst_matroska_demux_check_subtitle_buffer (GstElement * element,
return GST_FLOW_OK;
if (!sub_stream->invalid_utf8) {
if (g_utf8_validate ((gchar *) map.data, map.size, NULL)) {
if (g_utf8_validate ((gchar *) map.data, map.size - 1, NULL)) {
goto next;
}
GST_WARNING_OBJECT (element, "subtitle stream %" G_GUINT64_FORMAT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment