From 84f44336d5699811afbc85d79415b5e8c6ed2596 Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Tue, 24 Nov 2015 00:02:04 -0500 Subject: [PATCH] sb should be unsigned --- src/nyancat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nyancat.c b/src/nyancat.c index 1555269..5fb7506 100644 --- a/src/nyancat.c +++ b/src/nyancat.c @@ -353,7 +353,7 @@ int main(int argc, char ** argv) { int ttype; uint32_t option = 0, done = 0, sb_mode = 0; /* Various pieces for the telnet communication */ - char sb[1024] = {0}; + unsigned char sb[1024] = {0}; unsigned short sb_len = 0; /* Whether or not to show the MOTD intro */ @@ -485,7 +485,7 @@ int main(int argc, char ** argv) { /* This was a response to the TTYPE command, meaning * that this should be a terminal type */ alarm(2); - strcpy(term, &sb[2]); + strcpy(term, (char *)&sb[2]); done++; } else if (sb[0] == NAWS) {