summaryrefslogtreecommitdiff
path: root/libavformat/img.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-08 14:21:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-08 14:21:33 +0000
commit568e18b15e2ddf494fd8926707d34ca08c8edce5 (patch)
tree18f59992848e24c529a01bd98aed66af3762b2d1 /libavformat/img.c
parent934b0821dbb8fb33b2736fe4aab09fc2b6cc8ccc (diff)
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/img.c')
-rw-r--r--libavformat/img.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/img.c b/libavformat/img.c
index 95ab56b7e1..d52e1a0f59 100644
--- a/libavformat/img.c
+++ b/libavformat/img.c
@@ -123,7 +123,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
if (ap && ap->image_format)
s->img_fmt = ap->image_format;
- strcpy(s->path, s1->filename);
+ pstrcpy(s->path, sizeof(s->path), s1->filename);
s->img_number = 0;
s->img_count = 0;
@@ -289,7 +289,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)