[asterisk-commits] russell: branch 1.2 r94214 - /branches/1.2/channels/chan_iax2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 20 11:29:12 CST 2007
Author: russell
Date: Thu Dec 20 11:29:11 2007
New Revision: 94214
URL: http://svn.digium.com/view/asterisk?view=rev&rev=94214
Log:
Fix a couple of places where it's possible to dereference a NULL pointer.
Modified:
branches/1.2/channels/chan_iax2.c
Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?view=diff&rev=94214&r1=94213&r2=94214
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Thu Dec 20 11:29:11 2007
@@ -2629,7 +2629,7 @@
if (peername) {
var = ast_load_realtime("iaxpeers", "name", peername, "host", "dynamic", NULL);
- if (!var)
+ if (!var && sin)
var = ast_load_realtime("iaxpeers", "name", peername, "host", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr));
} else if (sin) {
char porta[25];
@@ -2646,7 +2646,7 @@
}
}
}
- if (!var) { /* Last ditch effort */
+ if (!var && peername) { /* Last ditch effort */
var = ast_load_realtime("iaxpeers", "name", peername, NULL);
/*!\note
* If this one loaded something, then we need to ensure that the host
More information about the asterisk-commits
mailing list