[asterisk-bugs] [Asterisk 0018989]: Segmentation fault if address can't resolved

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Apr 1 20:45:56 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18989 
====================================================================== 
Reported By:                Netview
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18989
Category:                   Core/Netsock
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.8.2.4 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 311197 
Request Review:              
====================================================================== 
Date Submitted:             2011-03-17 17:33 CDT
Last Modified:              2011-04-01 20:45 CDT
====================================================================== 
Summary:                    Segmentation fault if address can't resolved
Description: 
[2011-03-17 23:17:40] ERROR[1702]: netsock2.c:245 ast_sockaddr_resolve:
getaddrinfo("sip.terralink.de", "(null)", ...): Name or service not known
[2011-03-17 23:17:40] WARNING[1702]: acl.c:579 resolve_first: Unable to
lookup 'sip.terralink.de'
[2011-03-17 23:17:40] WARNING[1702]: acl.c:422 ast_append_ha: Invalid IP
address: (null)
Segmentation fault

a ping to sip.terralink.de gives no answer!
====================================================================== 

---------------------------------------------------------------------- 
 (0133302) Netview (reporter) - 2011-04-01 20:45
 https://issues.asterisk.org/view.php?id=18989#c133302 
---------------------------------------------------------------------- 
acl.c line 421
If I comment out the error-line no crash occurs:

if (!ast_sockaddr_parse(&ha->addr, address, PARSE_PORT_FORBID)) {
                ast_log(LOG_WARNING, "Invalid IP address: %s\n",
address);
                ast_free_ha(ha);
                /*if (error) {
                        *error = 1;
                }*/
                return ret;
        } 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-01 20:45 Netview        Note Added: 0133302                          
======================================================================




More information about the asterisk-bugs mailing list