diff svr-auth.c @ 1094:c45d65392c1a

Fix pointer differ in signess warnings [-Werror=pointer-sign]
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 15:59:06 +0200
parents e9dfb6d15193
children 7b84c3492a95
line wrap: on
line diff
--- a/svr-auth.c	Sat May 02 16:02:22 2015 +0200
+++ b/svr-auth.c	Sat May 02 15:59:06 2015 +0200
@@ -89,7 +89,7 @@
 
 	buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_BANNER);
 	buf_putbufstring(ses.writepayload, banner);
-	buf_putstring(ses.writepayload, "en", 2);
+	buf_putstring(ses.writepayload, (const unsigned char *)"en", 2);
 
 	encrypt_packet();
 
@@ -333,14 +333,14 @@
 	typebuf = buf_new(30); /* long enough for PUBKEY and PASSWORD */
 
 	if (ses.authstate.authtypes & AUTH_TYPE_PUBKEY) {
-		buf_putbytes(typebuf, AUTH_METHOD_PUBKEY, AUTH_METHOD_PUBKEY_LEN);
+		buf_putbytes(typebuf, (const unsigned char *)AUTH_METHOD_PUBKEY, AUTH_METHOD_PUBKEY_LEN);
 		if (ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
 			buf_putbyte(typebuf, ',');
 		}
 	}
 	
 	if (ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
-		buf_putbytes(typebuf, AUTH_METHOD_PASSWORD, AUTH_METHOD_PASSWORD_LEN);
+		buf_putbytes(typebuf, (const unsigned char *)AUTH_METHOD_PASSWORD, AUTH_METHOD_PASSWORD_LEN);
 	}
 
 	buf_putbufstring(ses.writepayload, typebuf);