summaryrefslogtreecommitdiff
path: root/authfd.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-09-22 21:05:50 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-09-22 21:05:50 +1000
commitc0815c927e177f27b1bcd6370e4c2b10caf95efe (patch)
treece3ca9f4f2a30ef0281b095dd01ef6c66454a8f1 /authfd.c
parentfb16b2411eda857cd358dc4c9c63b66edc217a51 (diff)
downloadopenssh-git-c0815c927e177f27b1bcd6370e4c2b10caf95efe.tar.gz
- miod@cvs.openbsd.org 2003/09/18 13:02:21
[authfd.c bufaux.c dh.c mac.c ssh-keygen.c] A few signedness fixes for harmless situations; markus@ ok
Diffstat (limited to 'authfd.c')
-rw-r--r--authfd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/authfd.c b/authfd.c
index c78db6d9..5fdf1ca3 100644
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfd.c,v 1.61 2003/06/28 16:23:06 deraadt Exp $");
+RCSID("$OpenBSD: authfd.c,v 1.62 2003/09/18 13:02:21 miod Exp $");
#include <openssl/evp.h>
@@ -114,7 +114,8 @@ ssh_get_authentication_socket(void)
static int
ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply)
{
- int l, len;
+ int l;
+ u_int len;
char buf[1024];
/* Get the length of the message, and format it in the buffer. */
@@ -147,7 +148,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
/* Extract the length, and check it for sanity. */
len = GET_32BIT(buf);
if (len > 256 * 1024)
- fatal("Authentication response too long: %d", len);
+ fatal("Authentication response too long: %u", len);
/* Read the rest of the response in to the buffer. */
buffer_clear(reply);
@@ -292,7 +293,7 @@ ssh_get_num_identities(AuthenticationConnection *auth, int version)
/* Get the number of entries in the response and check it for sanity. */
auth->howmany = buffer_get_int(&auth->identities);
- if (auth->howmany > 1024)
+ if ((u_int)auth->howmany > 1024)
fatal("Too many identities in authentication reply: %d",
auth->howmany);