about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-12-15 16:56:25 +0000
committerUlrich Drepper <drepper@redhat.com>1998-12-15 16:56:25 +0000
commita3fc1f7195e6c919f6606f6aefd2167236f7cae3 (patch)
tree0132f63826193a0a5cb9a7dd00b8c2e8a0eebc11
parente9dcb080809726a5531d2b5932b7f47e61d4bc49 (diff)
downloadglibc-a3fc1f7195e6c919f6606f6aefd2167236f7cae3.tar.gz
glibc-a3fc1f7195e6c919f6606f6aefd2167236f7cae3.tar.xz
glibc-a3fc1f7195e6c919f6606f6aefd2167236f7cae3.zip
Update.
1998-12-15  H.J. Lu  <hjl@gnu.org>

	* sysdeps/posix/tempname.c (__path_search): Fix the maximum
	string length.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/posix/tempname.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e34f11625b..7d7be3968d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1998-12-15  H.J. Lu  <hjl@gnu.org>
+
+	* sysdeps/posix/tempname.c (__path_search): Fix the maximum
+	string length.
+
 1998-12-15  Ulrich Drepper  <drepper@cygnus.com>
 
 	* sysdeps/unix/sysv/linux/msgctl.c: Use INLINE_SYSCALL.
diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
index a89a73721f..7437a8a420 100644
--- a/sysdeps/posix/tempname.c
+++ b/sysdeps/posix/tempname.c
@@ -95,7 +95,7 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
       return -1;
     }
 
-  sprintf (tmpl, "%*s/%*sXXXXXX", dlen, dir, plen, pfx);
+  sprintf (tmpl, "%.*s/%.*sXXXXXX", dlen, dir, plen, pfx);
   return 0;
 }