]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggparseogm.c
lavf/http.c: Free allocated client URLContext in case of error.
[ffmpeg] / libavformat / oggparseogm.c
index 4b4edf26ca36fc9e8fe2617edc5b83435991cf2f..a07453760b710be903313e7952a72a2773a8c943 100644 (file)
@@ -176,6 +176,9 @@ ogm_packet(AVFormatContext *s, int idx)
         os->pflags |= AV_PKT_FLAG_KEY;
 
     lb = ((*p & 2) << 1) | ((*p >> 6) & 3);
+    if (os->psize < lb + 1)
+        return AVERROR_INVALIDDATA;
+
     os->pstart += lb + 1;
     os->psize -= lb + 1;