-off by 1

This commit is contained in:
Christian Grothoff 2015-07-14 17:43:50 +02:00
parent 7b6c4a061f
commit 4d4319b84a
2 changed files with 23 additions and 1 deletions

View File

@ -236,6 +236,28 @@ AS_IF([test "x$enableval" = "xno"], [enable_dev=0])
AC_DEFINE_UNQUOTED([HAVE_DEVELOPER],[$enable_dev],[1 if developer logic is enabled, 0 otherwise])
# Adam shostack suggests the following for Windows:
# -D_FORTIFY_SOURCE=2 -fstack-protector-all
AC_ARG_ENABLE(gcc-hardening,
AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
[if test x$enableval = xyes; then
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all"
CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
CFLAGS="$CFLAGS --param ssp-buffer-size=1"
LDFLAGS="$LDFLAGS -pie"
fi])
# Linker hardening options
# Currently these options are ELF specific - you can't use this with MacOSX
AC_ARG_ENABLE(linker-hardening,
AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
[if test x$enableval = xyes; then
LDFLAGS="$LDFLAGS -z relro -z now"
fi])
# logging
extra_logging=0
AC_ARG_ENABLE([logging],

View File

@ -956,7 +956,7 @@ TMH_PARSE_json_data (struct MHD_Connection *connection,
}
if (GNUNET_YES != ret)
release_data (spec,
i);
i - 1);
return ret;
}