<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Hi</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">I found an issue where rtmpdump failed because a fixed-size buffer for tcURL was too small. The particular problem instance could be resolved by doubling the hard-coded buffer size, but it would be better eventually to work out the required size and malloc the buffer.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">I understand this issue has been noticed by others and discussed elsewhere (e.g. <a
 href="http://stream-recorder.com/forum/specify-tcurl-rtmpdump-might-not-work-t10355.html">stream-recorder.com/forum/specify-tcurl-rtmpdump-might-not-work-t10355.html</a>)</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">My proposed basic patch is therefore:</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">diff --git a/rtmpdump/rtmpdump.c b/rtmpdump/rtmpdump.c</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">index 01decf9..e06fe85 100644</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">--- a/rtmpdump/rtmpdump.c</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">+++
 b/rtmpdump/rtmpdump.c</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">@@ -1152,9 +1152,9 @@ main(int argc, char **argv)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">   if (tcUrl.av_len == 0)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">     {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">-      char str[512] = { 0 };</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">+      char str[1024] = { 0 };</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2">-      tcUrl.av_len = snprintf(str, 511, "%s://%.*s:%d/%.*s",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">+      tcUrl.av_len = snprintf(str, 1023, "%s://%.*s:%d/%.*s",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">                   RTMPProtocolStringsLower[protocol], hostname.av_len,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">                   hostname.av_val, port, app.av_len, app.av_val);</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">       tcUrl.av_val = (char *) malloc(tcUrl.av_len + 1);</font></div></div></div></body></html>