Mercurial > libavformat.hg
comparison wc3movie.c @ 4645:a9a2c60d0e84 libavformat
Fix a condition that causes an infinite loop, but only when compiled with
gcc 4.2.4 on x86_32. Thanks to Vitor for hunting this down.
author | melanson |
---|---|
date | Wed, 04 Mar 2009 05:40:53 +0000 |
parents | 34aa256311f0 |
children | ecf9f13948f1 |
comparison
equal
deleted
inserted
replaced
4644:2962d395431b | 4645:a9a2c60d0e84 |
---|---|
291 while (!packet_read) { | 291 while (!packet_read) { |
292 | 292 |
293 /* get the next chunk preamble */ | 293 /* get the next chunk preamble */ |
294 if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) != | 294 if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) != |
295 WC3_PREAMBLE_SIZE) | 295 WC3_PREAMBLE_SIZE) |
296 ret = AVERROR(EIO); | 296 return AVERROR(EIO); |
297 | 297 |
298 fourcc_tag = AV_RL32(&preamble[0]); | 298 fourcc_tag = AV_RL32(&preamble[0]); |
299 /* chunk sizes are 16-bit aligned */ | 299 /* chunk sizes are 16-bit aligned */ |
300 size = (AV_RB32(&preamble[4]) + 1) & (~1); | 300 size = (AV_RB32(&preamble[4]) + 1) & (~1); |
301 | 301 |