changeset 1431:793c43cf523e fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 24 Jun 2017 10:34:19 +0800
parents 69862e8cc405 (current diff) 7aebe7da3a35 (diff)
children 41dca1e5ea34
files configure.ac dss.c
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sat Jun 24 00:47:07 2017 +0800
+++ b/configure.ac	Sat Jun 24 10:34:19 2017 +0800
@@ -58,7 +58,15 @@
 	LDFLAGS="$LDFLAGS $TESTFLAGS"
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([])], 
 	    [AC_MSG_NOTICE([Setting $TESTFLAGS])], 
-	    [AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
+		[
+			LDFLAGS="$OLDLDFLAGS"
+			TESTFLAGS="-pie"
+			LDFLAGS="$LDFLAGS $TESTFLAGS"
+			AC_LINK_IFELSE([AC_LANG_PROGRAM([])], 
+				[AC_MSG_NOTICE([Setting $TESTFLAGS])], 
+				[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
+				)
+		]
 	    )
 	# readonly elf relocation sections (relro)
 	OLDLDFLAGS="$LDFLAGS"
--- a/dss.c	Sat Jun 24 00:47:07 2017 +0800
+++ b/dss.c	Sat Jun 24 10:34:19 2017 +0800
@@ -61,16 +61,14 @@
 		goto out;
 	}
 
-	if (mp_count_bits(key->p) < DSS_P_BITS) {
+	if (mp_count_bits(key->p) != DSS_P_BITS) {
 		dropbear_log(LOG_WARNING, "Bad DSS p");
-		TRACE(("leave buf_get_dss_pub_key: short key"))
 		ret = DROPBEAR_FAILURE;
 		goto out;
 	}
 
-	if (mp_count_bits(key->q) < DSS_Q_BITS) {
+	if (mp_count_bits(key->q) != DSS_Q_BITS) {
 		dropbear_log(LOG_WARNING, "Bad DSS q");
-		TRACE(("leave buf_get_dss_pub_key: short key"))
 		ret = DROPBEAR_FAILURE;
 		goto out;
 	}