gst/subparse/gstsubparse.c: Fix invalid memory access: make sure string passed to regexec() is NUL-termianted.
Original commit message from CVS: * gst/subparse/gstsubparse.c: (gst_subparse_type_find): Fix invalid memory access: make sure string passed to regexec() is NUL-termianted.
This commit is contained in:
parent
2bd6096768
commit
b57078cd60
@ -1,3 +1,9 @@
|
|||||||
|
2006-03-09 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/subparse/gstsubparse.c: (gst_subparse_type_find):
|
||||||
|
Fix invalid memory access: make sure string passed to
|
||||||
|
regexec() is NUL-termianted.
|
||||||
|
|
||||||
2006-03-09 Tim-Philipp Müller <tim at centricular dot net>
|
2006-03-09 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/typefind/gsttypefindfunctions.c: (mp3_type_find_at_offset),
|
* gst/typefind/gsttypefindfunctions.c: (mp3_type_find_at_offset),
|
||||||
|
@ -867,10 +867,16 @@ gst_subparse_type_find (GstTypeFind * tf, gpointer private)
|
|||||||
{
|
{
|
||||||
const guint8 *data;
|
const guint8 *data;
|
||||||
GstSubParseFormat format;
|
GstSubParseFormat format;
|
||||||
|
gchar *str;
|
||||||
|
|
||||||
if (!(data = gst_type_find_peek (tf, 0, 36)))
|
if (!(data = gst_type_find_peek (tf, 0, 36)))
|
||||||
return;
|
return;
|
||||||
format = gst_sub_parse_data_format_autodetect ((gchar *) data);
|
|
||||||
|
/* make sure string passed to _autodetect() is NUL-terminated */
|
||||||
|
str = g_strndup ((gchar *) data, 35);
|
||||||
|
format = gst_sub_parse_data_format_autodetect (str);
|
||||||
|
g_free (str);
|
||||||
|
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case GST_SUB_PARSE_FORMAT_MDVDSUB:
|
case GST_SUB_PARSE_FORMAT_MDVDSUB:
|
||||||
GST_DEBUG ("MicroDVD format detected");
|
GST_DEBUG ("MicroDVD format detected");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user