<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body >Thank you!<div><br></div><div>The two issues found by me are now combined in to one pull request: https://github.com/thatguystone/rtmpdump/pull/4 </div><br><br><div id="signid"></div><div id="replyid"><br><br><blockquote style="margin:0 0 0 .8ex;border-left: 1px solid rgb(0, 0, 255); padding-left:1ex;"><div dir="ltr"><div>Consider to create a pull request on github, check the project name in this conversation:</div><div><br></div><a href="http://lists.mplayerhq.hu/pipermail/rtmpdump/2015-August/002475.html" target="_blank">http://lists.mplayerhq.hu/pipermail/rtmpdump/2015-August/002475.html</a><div><br></div><div>There's no better option to track patches at the moment.</div></div><div><br><div>On Tue, Jan 12, 2016 at 8:43 AM, fcicq <span dir="ltr"><<a href="mailto:fcicq@fcicq.net" target="_blank">fcicq@fcicq.net</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u><div><div>The caller of ServeInvoke() is ServePacket().<br></div><div><span><br></span></div><div><span><div>    case RTMP_PACKET_TYPE_FLEX_MESSAGE:</div><div>      // flex message</div><div>      {</div><div>        ret = ServeInvoke(server, which, packet, packet->m_body + 1);</div><div>        break;</div><div>      }</div><div>    case RTMP_PACKET_TYPE_INVOKE:</div><div>      // invoke</div><div>      ret = ServeInvoke(server, which, packet, packet->m_body);</div><div>      break;</div></span></div><div><span><br></span><br></div><div>but sadly, if nBodySize is 0, packet->m_body or body in ServeInvoke() which will also become null, would you expect AMF_Decode() to output an usable command?</div><br><br><br><br><br><br><br><br><div><br></div><div>Maybe this empty packet should trigger a warning type log, but as long as the return value is 0, that is not so critical.</div><div><div><div><br></div><br><br><div></div><div><br><br><blockquote style="margin:0 0 0 .8ex;border-left:1px solid rgb(0,0,255);padding-left:1ex">The Video.DimensionChange event is a courtesy event from the player and does not exist on the wire. Empty packets are valid part of the spec. They have a number of uses in RTMP. <br><br>Sent from my iPhone<br><br>> On Jan 11, 2016, at 12:20 PM, fcicq <<a href="mailto:fcicq@fcicq.net" target="_blank">fcicq@fcicq.net</a>> wrote:<br>> <br>> Without the nBodySize check, the later (body[0] != 0x02) check will trigger a null pointer deference and cause a crash.<br>> This kind of empty packet may have some relationship with NetStream.Video.DimensionChange event.<br>> <br>> diff --git a/rtmpsuck.c b/rtmpsuck.c<br>> index e886179..633a1f3 100644<br>> --- a/rtmpsuck.c<br>> +++ b/rtmpsuck.c<br>> @@ -160,6 +160,12 @@ ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *b<br>>   int ret = 0, nRes;<br>>   int nBodySize = pack->m_nBodySize;<br>> <br>> +  if (!nBodySize)<br>> +    {<br>> +      RTMP_Log(RTMP_LOGERROR, "%s, empty packet from %s", __FUNCTION__, cst[which]);<br>> +      return 0;<br>> +    }<br>> +<br>>   if (body > pack->m_body)<br>>     nBodySize--;<br>> <br>> <br>> _______________________________________________<br>> rtmpdump mailing list<br>> <a href="mailto:rtmpdump@mplayerhq.hu" target="_blank">rtmpdump@mplayerhq.hu</a><br>> <a href="https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump" target="_blank">https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump</a><br>_______________________________________________<br>rtmpdump mailing list<br><a href="mailto:rtmpdump@mplayerhq.hu" target="_blank">rtmpdump@mplayerhq.hu</a><br><a href="https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump" target="_blank">https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump</a><br></blockquote></div></div></div></div><br>_______________________________________________<br><BR />rtmpdump mailing list<br><BR /><a href="mailto:rtmpdump@mplayerhq.hu" target="_blank">rtmpdump@mplayerhq.hu</a><br><BR /><a href="https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump" target="_blank">https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump</a><br><BR /><br></blockquote></div><br></div><BR />_______________________________________________<br>rtmpdump mailing list<br><a href="mailto:rtmpdump@mplayerhq.hu" target="_blank">rtmpdump@mplayerhq.hu</a><br><a href="https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump" target="_blank">https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump</a><br></blockquote></div></body></html>