From 451712d95f7169ade5c59b7be40b304141ae2c51 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 10 Apr 2017 22:19:30 -0700 Subject: [PATCH] libtelnet - Fix improper statement construction (not a bug in the binary) * libstand hammer1.c - remove extra format element in debugging printf. This code is not compiled by the build anyway. * Fix statement construction in rsaencpwd.c. The prior code generated the desired result (incrementing the ptr), but there was an extra ineffective indirection. Removed the ineffective indirection. Dragonfly-bugs: 3010 (dcb) --- lib/libstand/hammer1.c | 2 +- lib/libtelnet/rsaencpwd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libstand/hammer1.c b/lib/libstand/hammer1.c index 785c13c774..34ee538b61 100644 --- a/lib/libstand/hammer1.c +++ b/lib/libstand/hammer1.c @@ -929,7 +929,7 @@ hammer_open(const char *path, struct open_file *f) } #if DEBUG - printf("hammer_open %s %p %ld\n", path, f); + printf("hammer_open %s %p\n", path, f); #endif hf->ino = hlookup(&hf->hfs, path); diff --git a/lib/libtelnet/rsaencpwd.c b/lib/libtelnet/rsaencpwd.c index 37e0796cb4..5068a2f8f4 100644 --- a/lib/libtelnet/rsaencpwd.c +++ b/lib/libtelnet/rsaencpwd.c @@ -333,7 +333,7 @@ rsaencpwd_reply(ap, data, cnt) if (*ptr != 0x04) { return; } - *ptr++; + ptr++; /* skip 0x04 */ challenge_len = DecodeValueLength(ptr); ptr += NumEncodeLengthOctets(challenge_len); memmove(challenge, ptr, challenge_len); @@ -341,7 +341,7 @@ rsaencpwd_reply(ap, data, cnt) if (*ptr != 0x04) { return; } - *ptr++; + ptr++; /* skip 0x04 */ pubkey_len = DecodeValueLength(ptr); ptr += NumEncodeLengthOctets(pubkey_len); memmove(pubkey, ptr, pubkey_len); -- 2.41.0