[rtmpdump] branch master updated. 30fcf46 Check for malloc failure in prev commit

gitolite gil at avcodec.org
Tue Nov 8 11:14:47 CET 2011


The branch, master has been updated
       via  30fcf46fc82f96ca41b710fc38bbc15f2489795e (commit)
      from  1c77ff43439068981d2ad9872952922a1ee37f89 (commit)


- Log -----------------------------------------------------------------
commit 30fcf46fc82f96ca41b710fc38bbc15f2489795e
Author:     Howard Chu <hyc at highlandsun.com>
AuthorDate: Tue Nov 8 02:14:21 2011 -0800
Commit:     Howard Chu <hyc at highlandsun.com>
CommitDate: Tue Nov 8 02:14:21 2011 -0800

    Check for malloc failure in prev commit

diff --git a/rtmpdump.c b/rtmpdump.c
index 892a8bc..c37def2 100644
--- a/rtmpdump.c
+++ b/rtmpdump.c
@@ -1155,6 +1155,8 @@ main(int argc, char **argv)
 	  tcUrl.av_len = strlen(RTMPProtocolStringsLower[protocol]) +
 	  	hostname.av_len + app.av_len + sizeof("://:65535/");
       tcUrl.av_val = (char *) malloc(tcUrl.av_len);
+	  if (!tcUrl.av_val)
+	    return RD_FAILED;
       tcUrl.av_len = snprintf(tcUrl.av_val, tcUrl.av_len, "%s://%.*s:%d/%.*s",
 	  	   RTMPProtocolStringsLower[protocol], hostname.av_len,
 		   hostname.av_val, port, app.av_len, app.av_val);

-----------------------------------------------------------------------

Summary of changes:
 rtmpdump.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


hooks/post-receive
-- 



More information about the rtmpdump mailing list