about summary refs log tree commit diff
path: root/string/strfry.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-22 16:04:18 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-22 16:04:18 +0000
commit0008163a30fec920ede228aea2f6e06e75e76514 (patch)
tree3a3c4d2ce46e456d1387b5c4f5ea92221f2f238e /string/strfry.c
parent2e0e1a0512c9886222dc32e1a791a7f6b5b69f68 (diff)
downloadglibc-0008163a30fec920ede228aea2f6e06e75e76514.tar.gz
glibc-0008163a30fec920ede228aea2f6e06e75e76514.tar.xz
glibc-0008163a30fec920ede228aea2f6e06e75e76514.zip
* nis/nis_table.c (nis_list): Don't fail if __follow_path returned
	NIS_NOTFOUND.
Diffstat (limited to 'string/strfry.c')
-rw-r--r--string/strfry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string/strfry.c b/string/strfry.c
index a8b202d176..d392d5526b 100644
--- a/string/strfry.c
+++ b/string/strfry.c
@@ -42,7 +42,7 @@ strfry (char *string)
     {
       int32_t j;
       __random_r (&rdata, &j);
-      j = j % len + 1;
+      j = j % (len - i) + i;
 
       char c = string[i];
       string[i] = string[j];