Changeset 1592


Ignore:
Timestamp:
Nov 22, 2007 10:45:08 AM (12 years ago)
Author:
bennylp
Message:

Reject 0.0.0.0 IP address returned by gethostbyname() in pj_gethostip()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/addr_resolv_sock.c

    r1585 r1592  
    7878     * interface to connect to some public host. 
    7979     */ 
    80     if (status != PJ_SUCCESS || (pj_ntohl(addr->s_addr) >> 24)==127) { 
     80    if (status != PJ_SUCCESS || (pj_ntohl(addr->s_addr) >> 24)==127 || 
     81        addr->s_addr == 0)  
     82    { 
    8183        pj_sock_t fd; 
    8284        pj_str_t cp; 
Note: See TracChangeset for help on using the changeset viewer.