1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

http: use av_strlcpy instead of strcpy() without size checks

Fixes CID700730.
This commit is contained in:
Janne Grunau 2012-10-09 20:50:50 +02:00
parent 79e6e8eba2
commit 4a7c0c4555

View File

@ -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);