[asterisk-commits] pabelanger: branch 1.8 r279280 - /branches/1.8/include/asterisk/netsock2.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jul 24 13:18:49 CDT 2010


Author: pabelanger
Date: Sat Jul 24 13:18:43 2010
New Revision: 279280

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=279280
Log:
Check if ast_sockaddr is NULL then return. 

(closes issue #17677)
Reported by: outcast
Patches:
      issue0017677.patch uploaded by pabelanger (license 224)
Tested by: elguero

Modified:
    branches/1.8/include/asterisk/netsock2.h

Modified: branches/1.8/include/asterisk/netsock2.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/include/asterisk/netsock2.h?view=diff&rev=279280&r1=279279&r2=279280
==============================================================================
--- branches/1.8/include/asterisk/netsock2.h (original)
+++ branches/1.8/include/asterisk/netsock2.h Sat Jul 24 13:18:43 2010
@@ -82,7 +82,7 @@
  */
 static inline int ast_sockaddr_isnull(const struct ast_sockaddr *addr)
 {
-	return addr->len == 0;
+	return !addr || addr->len == 0;
 }
 
 /*!




More information about the asterisk-commits mailing list