1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Check the return value of strunvis against -1 not NULL.

This commit is contained in:
Nicholas Marriott 2009-08-23 11:40:05 +00:00
parent 926b52b600
commit 1eb303e6d4

View File

@ -173,7 +173,7 @@ tty_term_override(struct tty_term *term, const char *overrides)
if ((ptr = strchr(entstr, '=')) != NULL) {
*ptr++ = '\0';
val = xstrdup(ptr);
if (strunvis(val, ptr) == NULL) {
if (strunvis(val, ptr) == -1) {
xfree(val);
val = xstrdup(ptr);
}