From 169f41a43c6e7f98a1d0f3f62591a3cf527291fa Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 15 Jun 2017 08:00:07 +0800 Subject: [PATCH 1/2] fix missing arglist NULL terminator --- dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dss.c b/dss.c index 8f4f195..60e97c1 100644 --- a/dss.c +++ b/dss.c @@ -94,7 +94,7 @@ int buf_get_dss_priv_key(buffer* buf, dropbear_dss_key *key) { m_mp_alloc_init_multi(&key->x, NULL); ret = buf_getmpint(buf, key->x); if (ret == DROPBEAR_FAILURE) { - m_mp_free_multi(&key->x); + m_mp_free_multi(&key->x, NULL); } return ret; From af2caaab7279b14ea2ed92726086c9f8f2935e75 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Fri, 23 Jun 2017 21:31:25 +0800 Subject: [PATCH 2/2] Compile with -fno-strict-overflow if possible. Needed for curve25519-donna https://github.com/agl/curve25519-donna/issues/31 --- configure.ac | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 767bd05..1e4ea4a 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ AC_PREREQ(2.59) AC_INIT AC_CONFIG_SRCDIR(buffer.c) -OLDCFLAGS=$CFLAGS +OLDCFLAGS="$CFLAGS" # Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET @@ -24,6 +24,17 @@ if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then CFLAGS="-Os -W -Wall -Wno-pointer-sign" fi +AC_MSG_CHECKING([if compiler '$CC' supports -fno-strict-overflow]) +OLDCFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fno-strict-overflow" +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT(yes)], + [ + AC_MSG_RESULT(no) + CFLAGS=$OLDCFLAGS + ] + ) + # large file support is useful for scp AC_SYS_LARGEFILE