diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-02-26 22:35:07 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-02-26 22:35:07 +0000 |
commit | d597655f771979c70c08f8f8ed84c1319da121e8 (patch) | |
tree | 253f3ea2e91f1f76a855f278401eeddc65b5ed5d | |
parent | b2eb2ff098b21a3f50d08688a437e55d8f089390 (diff) | |
download | ffmpeg-d597655f771979c70c08f8f8ed84c1319da121e8.tar.gz |
Avoid infinite loop.
uint64_t >> 64 is an undefined operation
Originally committed as revision 12253 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/matroskaenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 2c1f542e1f..0927908387 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -149,7 +149,7 @@ static void put_ebml_num(ByteIOContext *pb, uint64_t num, int bytes) 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); |