diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-18 22:38:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-06 14:41:41 +0200 |
commit | 595954032e7b6ccd1e1cf73c7161594f98a05516 (patch) | |
tree | 2b6028ae85d1e96fc09b40b7e2f152fdf44e6649 | |
parent | 32982e145aaced0e6763fa8f0c5412e1d634b2f9 (diff) | |
download | ffmpeg-595954032e7b6ccd1e1cf73c7161594f98a05516.tar.gz |
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 9d40782088cf969fbadc881e4a97ec22b8ae0177)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/ftp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c index caeea42920..69caa7670c 100644 --- a/libavformat/ftp.c +++ b/libavformat/ftp.c @@ -972,6 +972,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; |