mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-29 11:44:23 -07:00
Merged revisions 201380 via svnmerge from
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
This commit is contained in:
@@ -21046,6 +21046,10 @@ static int acf_channel_read(struct ast_channel *chan, const char *funcname, char
|
||||
|
||||
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")) {
|
||||
|
||||
Reference in New Issue
Block a user