Commit b2be39db authored by bcoudurier's avatar bcoudurier

fix possible overflow with memmove

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12261 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c785da84
...@@ -256,7 +256,7 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -256,7 +256,7 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
if (type == 2) { // absolute path if (type == 2) { // absolute path
dref->path = av_mallocz(len+1); dref->path = av_mallocz(len+1);
get_buffer(pb, dref->path, len); 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; len -= volume_len;
memmove(dref->path, dref->path+volume_len, len); memmove(dref->path, dref->path+volume_len, len);
dref->path[len] = 0; dref->path[len] = 0;
......
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