summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 60ab69c5b0..6db3dc1859 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1309,7 +1309,7 @@ static int dyn_buf_write(void *opaque, uint8_t *buf, int buf_size)
unsigned new_size, new_allocated_size;
/* reallocate buffer if needed */
- new_size = d->pos + buf_size;
+ new_size = (unsigned)d->pos + buf_size;
new_allocated_size = d->allocated_size;
if (new_size < d->pos || new_size > INT_MAX/2)
return -1;