From c06a49c551ebfc7f320a05546b5a013714ac82e5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 28 Aug 2001 04:52:25 +0000 Subject: Update. 2001-08-27 Ulrich Drepper * misc/syslog.c (vsyslog): Try a bit harder to use syslogd. If the connection went down after we first used it try to connect again and resend the message before printing to the console. Reported by Coserea Gh. Tudor . 2001-08-27 Jakub Jelinek * string/tst-strlen.c (main): Test strnlen (, -1) too. * sysdeps/generic/strnlen.c (__strnlen): Fix for maxlens with top bit set. 2001-08-27 Ulrich Drepper * iconv/strtab.c (searchstring): Use correct length for comparison. (strtabadd): Account total size correct if new string has old string as substring. --- sysdeps/generic/strnlen.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/strnlen.c b/sysdeps/generic/strnlen.c index f1b6760247..1386acfd9c 100644 --- a/sysdeps/generic/strnlen.c +++ b/sysdeps/generic/strnlen.c @@ -36,6 +36,9 @@ __strnlen (const char *str, size_t maxlen) if (maxlen == 0) return 0; + if (__builtin_expect (end_ptr < str, 0)) + end_ptr = (const char *) ~0UL; + /* Handle the first few characters by reading one character at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = str; ((unsigned long int) char_ptr -- cgit v1.2.3