From da128169aaa250809ed2b143487d062708548fe3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 17 Jan 1996 00:46:59 +0000 Subject: Sun Jan 14 01:01:10 1996 Ulrich Drepper * stdlib/strtol.c: Return correct pointer for strings like "0xyz" and base 0 or 16. * string/strxfrm.c: Handle case for LENGTH == 0 correct. * sunrpc/etc.rpc: Add some more known protocols. Sun Jan 14 01:01:10 1996 Ulrich Drepper * stdlib/strtol.c: Return correct pointer for strings like "0xyz" and base 0 or 16. * string/strxfrm.c: Handle case for LENGTH == 0 correct. * sunrpc/etc.rpc: Add some more known protocols. --- string/strxfrm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'string/strxfrm.c') diff --git a/string/strxfrm.c b/string/strxfrm.c index 513a4b6..e40ae1c 100644 --- a/string/strxfrm.c +++ b/string/strxfrm.c @@ -32,5 +32,8 @@ strxfrm (dest, src, n) const char *src; size_t n; { + if (n == 0) + return strlen (src); + return __stpncpy (dest, src, n) - dest; } -- cgit v1.1