diff --git a/cli-session.c b/cli-session.c
index 1d5f9986ae650bdf678be1fe3f91e99a3bf834c5..8bf530c4a222aa2e78dbbb958498dff5e9837649 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -372,10 +372,10 @@ static void cli_remoteclosed() {
 /* 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++) {
diff --git a/session.h b/session.h
index 0059d948802867ff829deeda84b75e89454e8d64..0c96075425879497943275337d7f1fd733b72382 100644
--- a/session.h
+++ b/session.h
@@ -63,7 +63,7 @@ void svr_dropbear_log(int priority, const char* format, va_list param);
 /* 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 {