This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unterminated string


2002-08-25  Andreas Schwab  <schwab@suse.de>

	* elf/dl-reloc.c (_dl_reloc_bad_type): Nul-terminate message.

--- elf/dl-reloc.c.~1.64.2.2.~	2002-04-15 15:15:05.000000000 +0200
+++ elf/dl-reloc.c	2002-08-25 23:18:13.000000000 +0200
@@ -216,7 +216,8 @@ _dl_reloc_bad_type (struct link_map *map
 
   cp = __stpcpy (msgbuf, msg[plt]);
   *cp++ = DIGIT (type >> 4);
-  *cp = DIGIT (type);
+  *cp++ = DIGIT (type);
+  *cp = 0;
 
   _dl_signal_error (0, map->l_name, NULL, msgbuf);
 }

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]