From 36aee6bb45b54f2d242e256b5e596838c18c0b85 Mon Sep 17 00:00:00 2001 From: Liubov Dmitrieva Date: Thu, 29 Aug 2013 16:33:47 +0400 Subject: [PATCH] Buffer overrun detected by Intel MPX in wcschr test. Fixed. --- string/test-strchr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/string/test-strchr.c b/string/test-strchr.c index cbcf53ef804..572671f5475 100644 --- a/string/test-strchr.c +++ b/string/test-strchr.c @@ -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); -- 2.47.2