comparison cli-session.c @ 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 c45d65392c1a
children bb3a03feb31f aaf576b27a10
comparison
equal deleted inserted replaced
1100:7b84c3492a95 1101:94ff5316980f
370 } 370 }
371 371
372 /* Operates in-place turning dirty (untrusted potentially containing control 372 /* Operates in-place turning dirty (untrusted potentially containing control
373 * characters) text into clean text. 373 * characters) text into clean text.
374 * Note: this is safe only with ascii - other charsets could have problems. */ 374 * Note: this is safe only with ascii - other charsets could have problems. */
375 void cleantext(unsigned char* dirtytext) { 375 void cleantext(char* dirtytext) {
376 376
377 unsigned int i, j; 377 unsigned int i, j;
378 unsigned char c; 378 char c;
379 379
380 j = 0; 380 j = 0;
381 for (i = 0; dirtytext[i] != '\0'; i++) { 381 for (i = 0; dirtytext[i] != '\0'; i++) {
382 382
383 c = dirtytext[i]; 383 c = dirtytext[i];