[FFmpeg-cvslog] r12253 - trunk/libavformat/matroskaenc.c

aurel subversion
Tue Feb 26 23:35:07 CET 2008


Author: aurel
Date: Tue Feb 26 23:35:07 2008
New Revision: 12253

Log:
Avoid infinite loop.
uint64_t >> 64 is an undefined operation


Modified:
   trunk/libavformat/matroskaenc.c

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	(original)
+++ trunk/libavformat/matroskaenc.c	Tue Feb 26 23:35:07 2008
@@ -149,7 +149,7 @@ static void put_ebml_num(ByteIOContext *
 static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val)
 {
     int i, bytes = 1;
-    while (val >> bytes*8) bytes++;
+    while (val >> bytes*8 && bytes < 8) bytes++;
 
     put_ebml_id(pb, elementid);
     put_ebml_num(pb, bytes, 0);




More information about the ffmpeg-cvslog mailing list