[FFmpeg-cvslog] r18929 - trunk/libavformat/asfdec.c
bcoudurier
subversion
Sun May 24 12:26:41 CEST 2009
Author: bcoudurier
Date: Sun May 24 12:26:41 2009
New Revision: 18929
Log:
fix get_str16_nolen with odd len, fix #1065
Modified:
trunk/libavformat/asfdec.c
Modified: trunk/libavformat/asfdec.c
==============================================================================
--- trunk/libavformat/asfdec.c Sun May 24 11:59:53 2009 (r18928)
+++ trunk/libavformat/asfdec.c Sun May 24 12:26:41 2009 (r18929)
@@ -122,11 +122,12 @@ static void get_str16(ByteIOContext *pb,
static void get_str16_nolen(ByteIOContext *pb, int len, char *buf, int buf_size)
{
char* q = buf;
- len /= 2;
- while (len--) {
+ for (; len > 1; len -= 2) {
uint8_t tmp;
PUT_UTF8(get_le16(pb), tmp, if (q - buf < buf_size - 1) *q++ = tmp;)
}
+ if (len > 0)
+ url_fskip(pb, len);
*q = '\0';
}
More information about the ffmpeg-cvslog
mailing list