avformat/ftp: Check for av_strtok() failure

Fixes: CID1396258 Dereference null return value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/359/head
Michael Niedermayer 4 years ago
parent 0b3cdd7cc2
commit 9d40782088
  1. 2
      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;

Loading…
Cancel
Save