diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-04-06 19:42:28 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-04-06 22:04:03 +0200 |
commit | a0568ed2544025de3c66dd500811f5ba43f38af4 (patch) | |
tree | 9b3b0c197b96decf54f80f240a9788a5e1bedcb8 /libavformat/rtspdec.c | |
parent | 57d10a28f41b3cb6d43be02d10614ac993cc79b9 (diff) | |
download | ffmpeg-a0568ed2544025de3c66dd500811f5ba43f38af4.tar.gz |
rtspdec: check for strchr returning NULL.
Fixes CID 732244.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r-- | libavformat/rtspdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 74a7bf646f..af20465783 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -360,6 +360,10 @@ static inline int parse_command_line(AVFormatContext *s, const char *line, RTSPState *rt = s->priv_data; const char *linept, *searchlinept; linept = strchr(line, ' '); + if (!linept) { + av_log(s, AV_LOG_ERROR, "Error parsing method string\n"); + return AVERROR_INVALIDDATA; + } if (linept - line > methodsize - 1) { av_log(s, AV_LOG_ERROR, "Method string too long\n"); return AVERROR(EIO); |