Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-05-18 23:38:40 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-06 14:54:16 +0300
commit2104bed56282435e600a3652fc322248203de484 (patch)
treed8de7a5df48c156b8ae6f81637047f582fe6d712
parent5baa77567534789c6ab8fad66d1a063a76e137a9 (diff)
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index 3adc04ee1f..a98b0acbcb 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -949,6 +949,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;