diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-12-12 16:43:03 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-12-12 16:43:03 +0000 |
commit | 6419d6f7beb6af32facab158fcfb4f2dc973ccf0 (patch) | |
tree | 8129dac85b3fd1b92fb850428343bfbe116202f4 | |
parent | de26c86dffa492ba2ffdff021e88d9891f8be9f3 (diff) | |
download | fetchmail-6419d6f7beb6af32facab158fcfb4f2dc973ccf0.tar.gz fetchmail-6419d6f7beb6af32facab158fcfb4f2dc973ccf0.tar.bz2 fetchmail-6419d6f7beb6af32facab158fcfb4f2dc973ccf0.zip |
Fix crash on systems that do not provide strdup() in out-of-memory conditions.
Patch by Andreas Krennmair.
svn path=/branches/BRANCH_6-3/; revision=4988
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | TODO.txt | 3 | ||||
-rw-r--r-- | xmalloc.c | 3 |
3 files changed, 7 insertions, 1 deletions
@@ -85,6 +85,8 @@ fetchmail 6.3.6 (not yet released): This is important when fetchmail is in daemon mode and /etc/resolv.conf is changed later by dhcpcd, dhclient, pppd, openvpn or other ip-up/ipchange scripts. Should fix Debian Bug#389270, Bug#391698. +* Fix crash on systems that do not provide strdup() in out-of-memory conditions. + Patch by Andreas Krennmair. # TRANSLATIONS: * New en_GB (British English) translation by David Lodge. @@ -10,6 +10,9 @@ Ian D. Allen, fetchmail-users. Two messages with examples. What goes here? fetchmailrc location, server, port, user, folder, anything else? +6.4: +- remove dead replacement functions: strdup (Andreas Krennmair), ... + CODE: - check recent list mail - check Debian BTS and other bug trackers @@ -63,7 +63,8 @@ char *strdup(const char *s) { char *p; p = (char *) malloc(strlen(s)+1); - strcpy(p,s); + if (p) + strcpy(p,s); return p; } #endif /* !HAVE_STRDUP */ |