mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avformat/ftp: Check for av_strtok() failure
Fixes: CID1396258 Dereference null return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9d40782088)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -941,6 +941,8 @@ static int ftp_parse_entry_mlsd(char *mlsd, AVIODirEntry *next)
|
||||
continue;
|
||||
}
|
||||
fact = av_strtok(fact, "=", &value);
|
||||
if (!fact)
|
||||
continue;
|
||||
if (!av_strcasecmp(fact, "type")) {
|
||||
if (!av_strcasecmp(value, "cdir") || !av_strcasecmp(value, "pdir"))
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user