From 171e5d42ef4494bd52d3b5b702156b3f259721e2 Mon Sep 17 00:00:00 2001 From: James Laird Date: Wed, 3 Apr 2013 23:35:14 +1100 Subject: [PATCH] rtsp: safer buffer handling --- rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtsp.c b/rtsp.c index 63a8eb94..5b7ba6d1 100644 --- a/rtsp.c +++ b/rtsp.c @@ -406,7 +406,7 @@ static void handle_announce(rtsp_conn_info *conn, char *cp = req->content; int cp_left = req->contentlength; char *next; - while (cp) { + while (cp_left && cp) { next = nextline(cp, cp_left); cp_left -= next-cp;