Subject: ez-ipupdate: More segfault patches Package: ez-ipupdate Version: 3.0.11b8-10 Severity: normal
*** Please type your report below this line *** A few more instances of unchecked variables continue to produce segfaults (albeit more rarely than the patch I submitted last year). - Robert Jacobs Patch: --- ../ez-ipupdate-3.0.11b8/cache_file.c 2003-04-17 13:31:04.000000000 -0400 +++ cache_file.c 2005-08-18 14:47:20.417859984 -0400 @@ -133,7 +133,9 @@ int read_cache_file(char *file, time_t * ipstr = p; *date = strtoul(datestr, NULL, 10); - *ipaddr = strdup(ipstr); + + if (strcmp(ipstr,"(null)")!=0) + *ipaddr = strdup(ipstr); } else { --- ../ez-ipupdate-3.0.11b8/ez-ipupdate.c 2006-04-09 15:24:03.000000000 -0400 +++ ez-ipupdate.c 2005-08-18 14:44:31.510537800 -0400 @@ -1615,7 +1615,13 @@ int get_if_addr(int sock, char *name, st struct ifreq ifr; memset(&ifr, 0, sizeof(ifr)); - strcpy(ifr.ifr_name, name); + + if (name == NULL) { + dprintf((stderr, "get_if_addr called with name == NULL\n")); + } else { + strcpy(ifr.ifr_name, name); + } + /* why does this need to be done twice? */ if(ioctl(sock, SIOCGIFADDR, &ifr) < 0) { @@ -4748,7 +4754,7 @@ int main(int argc, char **argv) if(ipstr != NULL) { - if(address == NULL || *address == '\0') + if((address == NULL || *address == '\0') && interface != NULL) { #ifdef IF_LOOKUP struct sockaddr_in sin; -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12.5 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages ez-ipupdate depends on: ii adduser 3.85 Add and remove users and groups ii debconf [debconf-2.0] 1.4.72 Debian configuration management sy ii libc6 2.3.6-5 GNU C Library: Shared libraries an ez-ipupdate recommends no packages. -- debconf information: ez-ipupdate/dns_mx: * ez-ipupdate/service_type: dyns * ez-ipupdate/username: ez-ipupdate/server: ez-ipupdate/dns_wildcard: false * ez-ipupdate/hostname: * ez-ipupdate/interface: * ez-ipupdate/ppp: false -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]