diff options
author | Jonathan Rose <jrose@digium.com> | 2012-05-10 18:35:14 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2012-05-10 18:35:14 +0000 |
commit | 8227f70cd70f497cb03c1f9aab63950bcd979d8b (patch) | |
tree | 4f4587c0997f7a2d7ad8c6ecc89c3ad2971d5027 /main/acl.c | |
parent | 3430da58e9f168e608e46133225e0fc81589f6ef (diff) |
Coverity Report: Fix issues for error type CHECKED_RETURN for core
(issue ASTERISK-19658)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1905/
........
Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/acl.c')
-rw-r--r-- | main/acl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/acl.c b/main/acl.c index 7616236bc..590202653 100644 --- a/main/acl.c +++ b/main/acl.c @@ -533,7 +533,11 @@ int ast_apply_ha(const struct ast_ha *ha, const struct ast_sockaddr *addr) if (ast_sockaddr_is_ipv6(addr)) { if (ast_sockaddr_is_ipv4_mapped(addr)) { /* IPv4 ACLs apply to IPv4-mapped addresses */ - ast_sockaddr_ipv4_mapped(addr, &mapped_addr); + if (!ast_sockaddr_ipv4_mapped(addr, &mapped_addr)) { + ast_log(LOG_ERROR, "%s provided to ast_sockaddr_ipv4_mapped could not be converted. That shouldn't be possible.\n", + ast_sockaddr_stringify(addr)); + continue; + } addr_to_use = &mapped_addr; } else { /* An IPv4 ACL does not apply to an IPv6 address */ |