about summary refs log tree commit diff
path: root/string/strxfrm.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-01-17 00:46:59 +0000
committerRoland McGrath <roland@gnu.org>1996-01-17 00:46:59 +0000
commitda128169aaa250809ed2b143487d062708548fe3 (patch)
tree2946b976d7bbc97a2450da3eb4c5de80c73c29da /string/strxfrm.c
parent294897f4a6c1ef2fe408e37670e2bfbb0bf8a77d (diff)
downloadglibc-da128169aaa250809ed2b143487d062708548fe3.tar.gz
glibc-da128169aaa250809ed2b143487d062708548fe3.tar.xz
glibc-da128169aaa250809ed2b143487d062708548fe3.zip
Sun Jan 14 01:01:10 1996 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
	* 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  <drepper@ipd.info.uni-karlsruhe.de>

	* 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.
Diffstat (limited to 'string/strxfrm.c')
-rw-r--r--string/strxfrm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/string/strxfrm.c b/string/strxfrm.c
index 513a4b6a1a..e40ae1c433 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;
 }