fixed, validate extradata before dereferencing it
authorS. Davilla <davilla@4pi.com>
Sun, 25 Aug 2013 23:40:23 +0000 (19:40 -0400)
committerS. Davilla <davilla@4pi.com>
Sun, 25 Aug 2013 23:40:23 +0000 (19:40 -0400)
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp

index 200bcb5..edbc45d 100644 (file)
@@ -86,7 +86,7 @@ bool CDVDVideoCodecAmlogic::Open(CDVDStreamInfo &hints, CDVDCodecOptions &option
       m_pFormatName = "am-h264";
       // convert h264-avcC to h264-annex-b as h264-avcC
       // under streamers can have issues when seeking.
-      if (*(uint8_t*)m_hints.extradata == 1)
+      if (m_hints.extradata && *(uint8_t*)m_hints.extradata == 1)
       {
         m_bitstream = new CBitstreamConverter;
         m_bitstream->Open(m_hints.codec, (uint8_t*)m_hints.extradata, m_hints.extrasize, true);