aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ftp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-05-18 22:38:40 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-07-03 18:03:35 +0200
commit9d40782088cf969fbadc881e4a97ec22b8ae0177 (patch)
treee42876f48e35334d0e5b58aaac34116e11b6c1c2 /libavformat/ftp.c
parent0b3cdd7cc2c63969e144cc3eb39d0c61260509ee (diff)
downloadffmpeg-9d40782088cf969fbadc881e4a97ec22b8ae0177.tar.gz
avformat/ftp: Check for av_strtok() failure
Fixes: CID1396258 Dereference null return value Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/ftp.c')
-rw-r--r--libavformat/ftp.c2
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;