diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-06-05 17:59:26 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-06-05 17:59:26 +0200 |
commit | afc6a6a6c1839ad11d34d241656545ea6497a11f (patch) | |
tree | 1e056daf3d598a5ae7983b504df44c24769d7702 | |
parent | Fix reuse sock issues. (diff) | |
download | telnet-password-honeypot-afc6a6a6c1839ad11d34d241656545ea6497a11f.tar.xz telnet-password-honeypot-afc6a6a6c1839ad11d34d241656545ea6497a11f.zip |
Check for 0xff before control char.
-rw-r--r-- | honeypot.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -176,11 +176,12 @@ void readline(char *buffer, size_t size, int password) i -= 2; continue; } - } else if (iscntrl(c)) { - --i; - continue; } else if (c == 0xff) _exit(EXIT_SUCCESS); + else if (iscntrl(c)) { + --i; + continue; + } buffer[i] = c; putc(password ? '*' : c, output); fflush(output); |