matroskademux: fix strstr() usage on possibly unterminated string
authorRené Stadler <rene.stadler@nokia.com>
Sat, 16 May 2009 10:52:50 +0000 (13:52 +0300)
committerRené Stadler <mail@renestadler.de>
Thu, 8 Oct 2009 20:31:07 +0000 (23:31 +0300)
gst/matroska/matroska-demux.c

index 9c2dd7bae85bfa2d036344aea93b0f6ad1769a70..41e7539fb76aaf998b0e5786e3c8d149ca1e965e 100644 (file)
@@ -3706,7 +3706,7 @@ gst_matroska_demux_push_dvd_clut_change_event (GstMatroskaDemux * demux,
   buf = g_strndup ((gchar *) stream->codec_priv, stream->codec_priv_size);
 
   /* just locate and parse palette part */
-  start = strstr ((gchar *) stream->codec_priv, "palette:");
+  start = strstr (buf, "palette:");
   if (start) {
     gint i;
     guint32 clut[16];