]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Buffer overrun detected by Intel MPX in wcschr test. Fixed.
authorLiubov Dmitrieva <ldmitrie@sourceware.org>
Thu, 29 Aug 2013 12:33:47 +0000 (16:33 +0400)
committerLiubov Dmitrieva <ldmitrie@sourceware.org>
Wed, 23 Oct 2013 15:07:37 +0000 (19:07 +0400)
string/test-strchr.c

index cbcf53ef804e41123eebb434d1f192bfd27c6e52..572671f5475622a87c5a5d11f3b4defde458c0aa 100644 (file)
@@ -219,9 +219,14 @@ do_random_tests (void)
 static void
 check1 (void)
 {
-  char s[] __attribute__((aligned(16))) = "\xff";
-  char c = '\xfe';
-  char *exp_result = stupid_STRCHR (s, c);
+  CHAR s[] __attribute__((aligned(16))) =
+#ifdef WIDE
+  L"\xff";
+#else
+  "\xff";
+#endif
+  CHAR c = '\xfe';
+  CHAR *exp_result = stupid_STRCHR (s, c);
 
   FOR_EACH_IMPL (impl, 0)
     check_result (impl, s, c, exp_result);