[rtmpdump] Socket timeout/error within "ReadN" function

Skaarj NaPali skaarj1 at gmail.com
Sun Aug 22 12:53:32 CEST 2010


There is an invocation of "RTMPSockBuf_Fill" within the "ReadN"
function which does not handle the timeout and/or error state of the
socket correctly. It's the 2nd invocation of "RTMPSockBuf_Fill "
within the HTTP handling clause ("r->Link.protocol &
RTMP_FEATURE_HTTP2") within "ReadN".

It could get fixed as shown below:
...
                HTTP_read(r, 0);
            }
            if (r->m_resplen && !r->m_sb.sb_size)
                if (RTMPSockBuf_Fill(&r->m_sb) < 1)
                {
                    if (!r->m_sb.sb_timedout)
                        RTMP_Close(r);
                    return 0;
                }
            avail = r->m_sb.sb_size;
            if (avail > r->m_resplen)
                avail = r->m_resplen;
...


More information about the rtmpdump mailing list