# HG changeset patch # User Matt Johnston # Date 1516888525 -28800 # Node ID fb90a5ba84e0dd252ffa3ad62c97c1db99810dbd # Parent ef310db5ccec4e20d703f4c97547ee69711fb2c6# Parent 58a74cb829b822a869fa427daa0c5956a467aba4 Merge pull request #49 from fperrad/20170812_lint Some linting, const parameters diff -r 58a74cb829b8 -r fb90a5ba84e0 configure.ac --- a/configure.ac Sat Aug 19 22:39:53 2017 +0200 +++ b/configure.ac Thu Jan 25 21:55:25 2018 +0800 @@ -828,6 +828,7 @@ AS_MKDIR_P(libtomcrypt/src/modes/ofb) AS_MKDIR_P(libtomcrypt/src/modes/f8) AS_MKDIR_P(libtomcrypt/src/modes/lrw) +AS_MKDIR_P(libtomcrypt/src/modes/xts) AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/bit) AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/boolean) AS_MKDIR_P(libtomcrypt/src/pk/asn1/der/choice) diff -r 58a74cb829b8 -r fb90a5ba84e0 dbutil.c --- a/dbutil.c Sat Aug 19 22:39:53 2017 +0200 +++ b/dbutil.c Thu Jan 25 21:55:25 2018 +0800 @@ -506,7 +506,7 @@ void m_close(int fd) { int val; - if (fd == -1) { + if (fd < 0) { return; } diff -r 58a74cb829b8 -r fb90a5ba84e0 libtomcrypt/Makefile.in --- a/libtomcrypt/Makefile.in Sat Aug 19 22:39:53 2017 +0200 +++ b/libtomcrypt/Makefile.in Thu Jan 25 21:55:25 2018 +0800 @@ -9,7 +9,8 @@ PLATFORM := $(shell uname | sed -e 's/_.*//') -srcdir=. +VPATH=@srcdir@ +srcdir=@srcdir@ # Compiler and Linker Names #CC=gcc diff -r 58a74cb829b8 -r fb90a5ba84e0 libtommath/Makefile.in --- a/libtommath/Makefile.in Sat Aug 19 22:39:53 2017 +0200 +++ b/libtommath/Makefile.in Thu Jan 25 21:55:25 2018 +0800 @@ -2,7 +2,8 @@ # #Tom St Denis -srcdir=. +VPATH=@srcdir@ +srcdir=@srcdir@ # So that libtommath can include Dropbear headers for options and m_burn() CFLAGS += -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../ @@ -26,8 +27,6 @@ coverage: LIBNAME:=-Wl,--whole-archive $(LIBNAME) -Wl,--no-whole-archive -include makefile.include - LCOV_ARGS=--directory . #START_INS diff -r 58a74cb829b8 -r fb90a5ba84e0 svr-authpubkey.c --- a/svr-authpubkey.c Sat Aug 19 22:39:53 2017 +0200 +++ b/svr-authpubkey.c Thu Jan 25 21:55:25 2018 +0800 @@ -196,7 +196,7 @@ int ret = DROPBEAR_FAILURE; if (line->len < MIN_AUTHKEYS_LINE || line->len > MAX_AUTHKEYS_LINE) { - TRACE(("checkpubkey: bad line length %d", line->len)) + TRACE(("checkpubkey_line: bad line length %d", line->len)) return DROPBEAR_FAILURE; } @@ -261,7 +261,7 @@ /* check for space (' ') character */ if (buf_getbyte(line) != ' ') { - TRACE(("checkpubkey: space character expected, isn't there")) + TRACE(("checkpubkey_line: space character expected, isn't there")) goto out; } @@ -273,7 +273,7 @@ buf_setpos(line, pos); buf_setlen(line, line->pos + len); - TRACE(("checkpubkey: line pos = %d len = %d", line->pos, line->len)) + TRACE(("checkpubkey_line: line pos = %d len = %d", line->pos, line->len)) ret = cmp_base64_key(keyblob, keybloblen, (const unsigned char *) algo, algolen, line, NULL); @@ -361,8 +361,8 @@ } line_num++; - if (checkpubkey_line(line, line_num, filename, - algo, algolen, keyblob, keybloblen) == DROPBEAR_SUCCESS) { + ret = checkpubkey_line(line, line_num, filename, algo, algolen, keyblob, keybloblen); + if (ret == DROPBEAR_SUCCESS) { break; }