Browse code

Make size variables in dyn_buf_write unsigned so gcc will not optimize the check away (due to assuming signed overflows do not happen).

Originally committed as revision 15555 to svn://svn.ffmpeg.org/ffmpeg/trunk

Reimar Döffinger authored on 2008/10/05 06:11:58
Showing 1 changed files
... ...
@@ -711,7 +711,7 @@ typedef struct DynBuffer {
711 711
 static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size)
712 712
 {
713 713
     DynBuffer *d = opaque;
714
-    int new_size, new_allocated_size;
714
+    unsigned new_size, new_allocated_size;
715 715
 
716 716
     /* reallocate buffer if needed */
717 717
     new_size = d->pos + buf_size;