diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.c | 9 |
2 files changed, 9 insertions, 7 deletions
@@ -1,3 +1,8 @@ | |||
1 | 20051102 | ||
2 | - (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup(). | ||
3 | Reported by olavi at ipunplugged.com and antoine.brodin at laposte.net | ||
4 | via FreeBSD. | ||
5 | |||
1 | 20051030 | 6 | 20051030 |
2 | - (djm) [contrib/suse/openssh.spec contrib/suse/rc. | 7 | - (djm) [contrib/suse/openssh.spec contrib/suse/rc. |
3 | sshd contrib/suse/sysconfig.ssh] Bug #1106: Updated SuSE spec and init | 8 | sshd contrib/suse/sysconfig.ssh] Bug #1106: Updated SuSE spec and init |
@@ -3125,4 +3130,4 @@ | |||
3125 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 3130 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
3126 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 3131 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
3127 | 3132 | ||
3128 | $Id: ChangeLog,v 1.3925 2005/10/30 04:31:55 dtucker Exp $ | 3133 | $Id: ChangeLog,v 1.3926 2005/11/01 22:07:31 dtucker Exp $ |
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 6ba9bd986..d32b054d7 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include "includes.h" | 18 | #include "includes.h" |
19 | #include "xmalloc.h" | 19 | #include "xmalloc.h" |
20 | 20 | ||
21 | RCSID("$Id: bsd-misc.c,v 1.27 2005/05/27 11:13:41 dtucker Exp $"); | 21 | RCSID("$Id: bsd-misc.c,v 1.28 2005/11/01 22:07:31 dtucker Exp $"); |
22 | 22 | ||
23 | #ifndef HAVE___PROGNAME | 23 | #ifndef HAVE___PROGNAME |
24 | char *__progname; | 24 | char *__progname; |
@@ -223,10 +223,7 @@ strdup(const char *str) | |||
223 | len = strlen(str) + 1; | 223 | len = strlen(str) + 1; |
224 | cp = malloc(len); | 224 | cp = malloc(len); |
225 | if (cp != NULL) | 225 | if (cp != NULL) |
226 | if (strlcpy(cp, str, len) != len) { | 226 | return(memcpy(cp, str, len)); |
227 | free(cp); | 227 | return NULL; |
228 | return NULL; | ||
229 | } | ||
230 | return cp; | ||
231 | } | 228 | } |
232 | #endif | 229 | #endif |