This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 12/17] Fix off-by-one
- 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>, Dmitry Vyukov <dvyukov at google dot com>, Konstantin Khlebnikov <k dot khlebnikov at samsung dot com>, Andrey Ryabinin <a dot ryabinin at samsung dot com>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>
- Date: Thu, 16 Oct 2014 12:41:03 +0400
- Subject: [PATCH 12/17] Fix off-by-one
- Authentication-results: sourceware.org; auth=none
- References: <543F831B dot 4090502 at samsung dot com>
Same as mainline.
2014-10-15 Yury Gribov <y.gribov@samsung.com>
Backport from mainline
2014-08-12 Yury Gribov <y.gribov@samsung.com>
* internal-fn.c (init_internal_fns): Fix off-by-one.
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 0749dce..d64e20d 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;