[rtmpdump] segfault in rtmpsuck

joakim at verona.se joakim at verona.se
Mon Nov 29 11:15:48 CET 2010


When using rtmpsuck I sometimes get a segfault.

Here is a little patch that doesnt adress the real problem, but at least
stops the segfault:

Index: rtmpsuck.c
===================================================================
--- rtmpsuck.c	(revision 552)
+++ rtmpsuck.c	(working copy)
@@ -936,6 +936,10 @@
                        RTMP_ClientPacket(&server->rc, &pc))
                     {
                       int len = WriteStream(&buf, &buflen, &server->stamp, &pc);
+                      if(server->f_cur->f_file==0){//JAVE attempt at workaround
+                        RTMP_Log(RTMP_LOGERROR, "%s, stream oddly 0 ", __FUNCTION__);
+                        goto cleanup;
+                      }
                       if (len > 0 && fwrite(buf, 1, len, server->f_cur->f_file) != len)
                         goto cleanup;
                     }

-- 
Joakim Verona


More information about the rtmpdump mailing list