[FFmpeg-devel] [PATCH 5/6] avformat/rtsp: use MAX_URL_SIZE for one line parse

lance.lmwang at gmail.com lance.lmwang at gmail.com
Sun Dec 5 16:26:35 EET 2021


From: Limin Wang <lance.lmwang at gmail.com>

The buf is used for one line of sdp parsing, so it's ok to use MAX_URL_SIZE

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavformat/rtsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 233ed16..a8d079e 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -709,7 +709,7 @@ int ff_sdp_parse(AVFormatContext *s, const char *content)
 {
     const char *p;
     int letter, i;
-    char buf[SDP_MAX_SIZE], *q;
+    char buf[MAX_URL_SIZE], *q;
     SDPParseState sdp_parse_state = { { 0 } }, *s1 = &sdp_parse_state;
 
     p = content;
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list