[FFmpeg-cvslog] r12261 - trunk/libavformat/mov.c
bcoudurier
subversion
Wed Feb 27 10:30:05 CET 2008
Author: bcoudurier
Date: Wed Feb 27 10:30:05 2008
New Revision: 12261
Log:
fix possible overflow with memmove
Modified:
trunk/libavformat/mov.c
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c (original)
+++ trunk/libavformat/mov.c Wed Feb 27 10:30:05 2008
@@ -256,7 +256,7 @@ static int mov_read_dref(MOVContext *c,
if (type == 2) { // absolute path
dref->path = av_mallocz(len+1);
get_buffer(pb, dref->path, len);
- if (!strncmp(dref->path, volume, volume_len)) {
+ if (len > volume_len && !strncmp(dref->path, volume, volume_len)) {
len -= volume_len;
memmove(dref->path, dref->path+volume_len, len);
dref->path[len] = 0;
More information about the ffmpeg-cvslog
mailing list