Mercurial > libavformat.hg
changeset 3088:c497351ef9fa libavformat
Avoid infinite loop.
uint64_t >> 64 is an undefined operation
author | aurel |
---|---|
date | Tue, 26 Feb 2008 22:35:07 +0000 |
parents | 00058259d6a7 |
children | b519194083e6 |
files | matroskaenc.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskaenc.c Tue Feb 26 20:37:59 2008 +0000 +++ b/matroskaenc.c Tue Feb 26 22:35:07 2008 +0000 @@ -149,7 +149,7 @@ 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);