summaryrefslogtreecommitdiff
path: root/cli-kex.c
diff options
context:
space:
mode:
authorGa?l PORTAY <gael.portay@gmail.com>2015-05-02 15:59:06 +0200
committerGa?l PORTAY <gael.portay@gmail.com>2015-05-02 15:59:06 +0200
commit48646ccbad1aa607e79932ae89ba70430278b275 (patch)
tree797bb5dd8f9533a1b79376d621aea51993ef49f3 /cli-kex.c
parent0524860d6495f8cf4ae5dd04d71d03e3d49ce280 (diff)
downloaddropbear-48646ccbad1aa607e79932ae89ba70430278b275.tar.gz
Fix pointer differ in signess warnings [-Werror=pointer-sign]
Diffstat (limited to 'cli-kex.c')
-rw-r--r--cli-kex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli-kex.c b/cli-kex.c
index a590157..cefc077 100644
--- a/cli-kex.c
+++ b/cli-kex.c
@@ -322,7 +322,7 @@ static void checkhostkey(unsigned char* keyblob, unsigned int keybloblen) {
}
/* Compare hostnames */
- if (strncmp(cli_opts.remotehost, buf_getptr(line, hostlen),
+ if (strncmp(cli_opts.remotehost, (const char *) buf_getptr(line, hostlen),
hostlen) != 0) {
continue;
}
@@ -334,7 +334,7 @@ static void checkhostkey(unsigned char* keyblob, unsigned int keybloblen) {
continue;
}
- if (strncmp(buf_getptr(line, algolen), algoname, algolen) != 0) {
+ if (strncmp((const char *) buf_getptr(line, algolen), algoname, algolen) != 0) {
TRACE(("algo doesn't match"))
continue;
}
@@ -346,7 +346,7 @@ static void checkhostkey(unsigned char* keyblob, unsigned int keybloblen) {
}
/* Now we're at the interesting hostkey */
- ret = cmp_base64_key(keyblob, keybloblen, algoname, algolen,
+ ret = cmp_base64_key(keyblob, keybloblen, (const unsigned char *) algoname, algolen,
line, &fingerprint);
if (ret == DROPBEAR_SUCCESS) {
@@ -382,9 +382,9 @@ static void checkhostkey(unsigned char* keyblob, unsigned int keybloblen) {
fseek(hostsfile, 0, SEEK_END); /* In case it wasn't opened append */
buf_setpos(line, 0);
buf_setlen(line, 0);
- buf_putbytes(line, cli_opts.remotehost, hostlen);
+ buf_putbytes(line, (const unsigned char *) cli_opts.remotehost, hostlen);
buf_putbyte(line, ' ');
- buf_putbytes(line, algoname, algolen);
+ buf_putbytes(line, (const unsigned char *) algoname, algolen);
buf_putbyte(line, ' ');
len = line->size - line->pos;
/* The only failure with base64 is buffer_overflow, but buf_getwriteptr