From a5d1abed7b5875bf9c698f6d212e11ecd2aa94dd Mon Sep 17 00:00:00 2001 From: hyc Date: Sun, 28 Mar 2010 20:17:00 +0000 Subject: [PATCH] Check length for unescape git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@411 400ebc74-4327-4243-bc38-086b20814532 --- librtmp/rtmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c index e0f0c0a..202d37c 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c @@ -650,6 +650,8 @@ bool RTMP_SetupURL(RTMP *r, char *url) for (p1=p2; port >0;) { if (*p1 == '\\') { int c; + if (port < 3) + return false; sscanf(p1+1, "%02x", &c); *p2++ = c; port -= 3; -- 2.40.0