merge from main

--HG--
branch : fuzz
This commit is contained in:
Matt Johnston 2017-06-24 10:34:19 +08:00
commit 9b6f7fc9af
2 changed files with 11 additions and 5 deletions

View File

@ -58,7 +58,15 @@ if test "$hardenbuild" -eq 1; then
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"

6
dss.c
View File

@ -61,16 +61,14 @@ int buf_get_dss_pub_key(buffer* buf, dropbear_dss_key *key) {
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;
}