Mercurial > libavformat.hg
changeset 3090:a047cdd6c6b4 libavformat
fix possible overflow with memmove
author | bcoudurier |
---|---|
date | Wed, 27 Feb 2008 09:30:05 +0000 |
parents | b519194083e6 |
children | b8df4b5e16d0 |
files | mov.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Wed Feb 27 00:53:34 2008 +0000 +++ b/mov.c Wed Feb 27 09:30:05 2008 +0000 @@ -256,7 +256,7 @@ 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;