]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/movsub_bsf.c
libavcodec/iff: Use unsigned to avoid undefined behaviour
[ffmpeg] / libavcodec / movsub_bsf.c
index 5878607061eab7659792ab255f863986b605d7a5..cd48aa7bb8f724c7034b118836fcc86f43cef773 100644 (file)
@@ -75,8 +75,8 @@ static int mov2textsub(AVBSFContext *ctx, AVPacket *pkt)
        return AVERROR_INVALIDDATA;
     }
 
-    pkt->data += 2;
     pkt->size  = FFMIN(pkt->size - 2, AV_RB16(pkt->data));
+    pkt->data += 2;
 
     return 0;
 }