Ignore:
Timestamp:
03/21/09 00:28:51 (4 years ago)
Author:
sam
Message:

lib-fd.c: accept() may accept NULL as the addrlen argument. Do not crash
when faced with this situation. Closes #54.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/lib-fd.c

    r2542 r3408  
    257257    if(ret >= 0) 
    258258    { 
    259         debug("%s(%i, %p, &%i) = %i", __func__, 
    260               sockfd, addr, (int)*addrlen, ret); 
     259        if(addrlen) 
     260            debug("%s(%i, %p, &%i) = %i", __func__, 
     261                  sockfd, addr, (int)*addrlen, ret); 
     262        else 
     263            debug("%s(%i, %p, NULL) = %i", __func__, sockfd, addr, ret); 
    261264        _zz_register(ret); 
    262265    } 
Note: See TracChangeset for help on using the changeset viewer.