about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-07 19:24:57 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-07 19:24:57 +0000
commit22af13de454d18449856c2334f77e5e6b4818fa7 (patch)
tree6d1850fbf57469a435d125938d16bf7c8f7e4534 /posix
parent6cab95babf6338d5adae1f943e72546ef63636d1 (diff)
downloadglibc-22af13de454d18449856c2334f77e5e6b4818fa7.tar.gz
glibc-22af13de454d18449856c2334f77e5e6b4818fa7.tar.xz
glibc-22af13de454d18449856c2334f77e5e6b4818fa7.zip
Update.
	* posix/regex.c: Limit string length printed in debug messages to
	100 chars.
Diffstat (limited to 'posix')
-rw-r--r--posix/regex.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/posix/regex.c b/posix/regex.c
index cce218de05..77a0758440 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -1182,6 +1182,8 @@ PREFIX(print_double_string) (where, string1, size1, string2, size2)
     printf ("(null)");
   else
     {
+      int cnt;
+
       if (FIRST_STRING_P (where))
         {
           for (this_char = where - string1; this_char < size1; this_char++)
@@ -1190,8 +1192,16 @@ PREFIX(print_double_string) (where, string1, size1, string2, size2)
           where = string2;
         }
 
+      cnt = 0;
       for (this_char = where - string2; this_char < size2; this_char++)
-        PUT_CHAR (string2[this_char]);
+	{
+	  PUT_CHAR (string2[this_char]);
+	  if (++cnt > 100)
+	    {
+	      fputs ("...", stdout);
+	      break;
+	    }
+	}
     }
 }