[FFmpeg-cvslog] http: use av_strlcpy instead of strcpy() without size checks
Janne Grunau
git at videolan.org
Wed Oct 10 14:10:42 CEST 2012
ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Tue Oct 9 20:50:50 2012 +0200| [4a7c0c4555477c9367fb45ee0cc10e4351e53930] | committer: Janne Grunau
http: use av_strlcpy instead of strcpy() without size checks
Fixes CID700730.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a7c0c4555477c9367fb45ee0cc10e4351e53930
---
libavformat/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 43c6cbc..9666ca3 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -308,7 +308,7 @@ static int process_line(URLContext *h, char *line, int line_count,
while (isspace(*p))
p++;
if (!av_strcasecmp(tag, "Location")) {
- strcpy(s->location, p);
+ av_strlcpy(s->location, p, sizeof(s->location));
*new_location = 1;
} else if (!av_strcasecmp (tag, "Content-Length") && s->filesize == -1) {
s->filesize = strtoll(p, NULL, 10);
More information about the ffmpeg-cvslog
mailing list