diff svr-x11fwd.c @ 1123:d7b752525b91

buf_getstring and buf_putstring now use non-unsigned char*
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 23:08:50 +0800
parents 877256d1b3fb
children a3e8389e01ff 888e3d17e962
line wrap: on
line diff
--- a/svr-x11fwd.c	Thu Jun 04 22:25:28 2015 +0800
+++ b/svr-x11fwd.c	Thu Jun 04 23:08:50 2015 +0800
@@ -58,8 +58,8 @@
 	}
 
 	chansess->x11singleconn = buf_getbool(ses.payload);
-	chansess->x11authprot = (char *)buf_getstring(ses.payload, NULL);
-	chansess->x11authcookie = (char *)buf_getstring(ses.payload, NULL);
+	chansess->x11authprot = buf_getstring(ses.payload, NULL);
+	chansess->x11authcookie = buf_getstring(ses.payload, NULL);
 	chansess->x11screennum = buf_getint(ses.payload);
 
 	/* create listening socket */
@@ -203,7 +203,7 @@
 
 	if (send_msg_channel_open_init(fd, &chan_x11) == DROPBEAR_SUCCESS) {
 		ipstring = inet_ntoa(addr->sin_addr);
-		buf_putstring(ses.writepayload, (const unsigned char *)ipstring, strlen(ipstring));
+		buf_putstring(ses.writepayload, ipstring, strlen(ipstring));
 		buf_putint(ses.writepayload, addr->sin_port);
 
 		encrypt_packet();