On Tue, 16 Sep 2014, Vittorio Giovara wrote:
CC: [email protected] Bug-Id: CID 1041130 --- libavformat/rtspdec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index a14ec57..cc9c922 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -358,8 +358,11 @@ static inline int parse_command_line(AVFormatContext *s, const char *line, enum RTSPMethod *methodcode) { RTSPState *rt = s->priv_data; - const char *linept, *searchlinept; - linept = strchr(line, ' '); + const char *searchlinept; + const char *linept = strchr(line, ' '); + if (!linept) + return AVERROR_INVALIDDATA; + if (linept - line > methodsize - 1) { av_log(s, AV_LOG_ERROR, "Method string too long\n"); return AVERROR(EIO); -- 1.8.5.2 (Apple Git-48)
LGTM // Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
