OSDN Git Service

rtsp: Make sure we don't write too many transport entries into a fixed-size array
authorMartin Storsjö <martin@martin.st>
Fri, 24 Apr 2015 09:38:09 +0000 (12:38 +0300)
committerMartin Storsjö <martin@martin.st>
Fri, 24 Apr 2015 13:07:14 +0000 (16:07 +0300)
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtsp.c

index 1b60b4f..cbea685 100644 (file)
@@ -972,6 +972,8 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
             p++;
 
         reply->nb_transports++;
+        if (reply->nb_transports >= RTSP_MAX_TRANSPORTS)
+            break;
     }
 }