diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-08 14:21:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-08 14:21:33 +0000 |
commit | 568e18b15e2ddf494fd8926707d34ca08c8edce5 (patch) | |
tree | 18f59992848e24c529a01bd98aed66af3762b2d1 /libavformat/img2.c | |
parent | 934b0821dbb8fb33b2736fe4aab09fc2b6cc8ccc (diff) | |
download | ffmpeg-568e18b15e2ddf494fd8926707d34ca08c8edce5.tar.gz |
integer overflows, heap corruption
possible arbitrary code execution cannot be ruled out in some cases
precautionary checks
Originally committed as revision 3813 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r-- | libavformat/img2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index d870814b4e..fcf7310208 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -184,7 +184,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) return -ENOMEM; } - strcpy(s->path, s1->filename); + pstrcpy(s->path, sizeof(s->path), s1->filename); s->img_number = 0; s->img_count = 0; @@ -310,7 +310,7 @@ static int img_write_header(AVFormatContext *s) VideoData *img = s->priv_data; img->img_number = 1; - strcpy(img->path, s->filename); + pstrcpy(img->path, sizeof(img->path), s->filename); /* find format */ if (s->oformat->flags & AVFMT_NOFILE) |