This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix off-by-one in internal-fn.c
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 12 Aug 2014 11:17:48 +0400
- Subject: [PATCH] Fix off-by-one in internal-fn.c
- Authentication-results: sourceware.org; auth=none
This is a fix for off-by-one bug that I've recently introduced in
r213806. Bootstrapped, regtested and Asan-boostrapped on x64.
Ok to commit?
-Y
commit cc88579f072240686605783229129700f9eb78a0
Author: Yury Gribov <y.gribov@samsung.com>
Date: Mon Aug 11 19:30:24 2014 +0400
2014-08-12 Yury Gribov <y.gribov@samsung.com>
gcc/
* internal-fn.c (init_internal_fns): Fix off-by-one.
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 230fefc..af45d27 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -62,7 +62,7 @@ init_internal_fns ()
{
#define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) \
if (FNSPEC) internal_fn_fnspec_array[IFN_##CODE] = \
- build_string ((int) sizeof (FNSPEC) + 1, FNSPEC ? FNSPEC : "");
+ build_string ((int) sizeof (FNSPEC), FNSPEC ? FNSPEC : "");
#include "internal-fn.def"
#undef DEF_INTERNAL_FN
internal_fn_fnspec_array[IFN_LAST] = 0;