Commit 64e105e0 authored by Philip Gladstone's avatar Philip Gladstone

Fix a potential endless loop (nb (1 * 3) / 2 == 1)

Originally committed as revision 823 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a28d4f86
...@@ -519,7 +519,7 @@ static void dyn_buf_write(void *opaque, UINT8 *buf, int buf_size) ...@@ -519,7 +519,7 @@ static void dyn_buf_write(void *opaque, UINT8 *buf, int buf_size)
if (!new_allocated_size) if (!new_allocated_size)
new_allocated_size = new_size; new_allocated_size = new_size;
else else
new_allocated_size = (new_allocated_size * 3) / 2; new_allocated_size = (new_allocated_size * 3) / 2 + 1;
} }
if (new_allocated_size > d->allocated_size) { if (new_allocated_size > d->allocated_size) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment