changeset 1101:94ff5316980f

Turn cleantext()'s dirtytext argument into char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 16:08:08 +0200
parents 7b84c3492a95
children ae63de5caf81
files cli-session.c session.h
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cli-session.c	Sat May 02 15:26:05 2015 +0200
+++ b/cli-session.c	Sat May 02 16:08:08 2015 +0200
@@ -372,10 +372,10 @@
 /* Operates in-place turning dirty (untrusted potentially containing control
  * characters) text into clean text. 
  * Note: this is safe only with ascii - other charsets could have problems. */
-void cleantext(unsigned char* dirtytext) {
+void cleantext(char* dirtytext) {
 
 	unsigned int i, j;
-	unsigned char c;
+	char c;
 
 	j = 0;
 	for (i = 0; dirtytext[i] != '\0'; i++) {
--- a/session.h	Sat May 02 15:26:05 2015 +0200
+++ b/session.h	Sat May 02 16:08:08 2015 +0200
@@ -63,7 +63,7 @@
 /* Client */
 void cli_session(int sock_in, int sock_out, struct dropbear_progress_connection *progress) ATTRIB_NORETURN;
 void cli_connected(int result, int sock, void* userdata, const char *errstring);
-void cleantext(unsigned char* dirtytext);
+void cleantext(char* dirtytext);
 
 /* crypto parameters that are stored individually for transmit and receive */
 struct key_context_directional {