mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
rtmpproto: Avoid using uninitialized memory
If the url ends with .flv, we stripped it but didn't initialize rt->playpath, doing av_strlcat on an uninitialized buffer. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
d01e684186
commit
24eb3c7916
@ -2510,9 +2510,9 @@ reconnect:
|
||||
(!strcmp(fname + len - 4, ".f4v") ||
|
||||
!strcmp(fname + len - 4, ".mp4"))) {
|
||||
memcpy(rt->playpath, "mp4:", 5);
|
||||
} else if (len >= 4 && !strcmp(fname + len - 4, ".flv")) {
|
||||
fname[len - 4] = '\0';
|
||||
} else {
|
||||
if (len >= 4 && !strcmp(fname + len - 4, ".flv"))
|
||||
fname[len - 4] = '\0';
|
||||
rt->playpath[0] = 0;
|
||||
}
|
||||
av_strlcat(rt->playpath, fname, PLAYPATH_MAX_LENGTH);
|
||||
|
Loading…
Reference in New Issue
Block a user