]> git.sesse.net Git - ffmpeg/commitdiff
mov: fix global unicode convertion array overflow.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 23 Mar 2012 00:09:04 +0000 (01:09 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 23 Mar 2012 00:09:04 +0000 (01:09 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c

index 2687a88816f21e93123cfc15ade7319258a68fff..66c1886112d917619b391d0dea94981db6e12bae 100644 (file)
@@ -160,7 +160,7 @@ static int mov_read_mac_string(MOVContext *c, AVIOContext *pb, int len,
         uint8_t t, c = avio_r8(pb);
         if (c < 0x80 && p < end)
             *p++ = c;
-        else
+        else if (p < end)
             PUT_UTF8(mac_to_unicode[c-0x80], t, if (p < end) *p++ = t;);
     }
     *p = 0;