https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r201380 | dbrooks | 2009-06-17 13:45:50 -0500 (Wed, 17 Jun 2009) | 9 lines
Checks for NULL sip_pvt pointer in chan_sip.c->acf_channel_read()
Zombie channels could be passed, and chan_sip.c wasn't checking for it.
Could crash Asterisk. Now checking for NULL pointer.
(closes issue #15330)
Reported by: okrief
Tested by: dbrooks
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201381
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
memset(buf, 0, buflen);
+ if (p == NULL) {
+ return -1;
+ }
+
if (!strcasecmp(args.param, "peerip")) {
ast_copy_string(buf, p->sa.sin_addr.s_addr ? ast_inet_ntoa(p->sa.sin_addr) : "", buflen);
} else if (!strcasecmp(args.param, "recvip")) {