aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nyancat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index 234ff10..fbb3c6e 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -483,7 +483,7 @@ int main(int argc, char ** argv) {
/* Begin Extended Option Mode */
sb_mode = 1;
sb_len = 0;
- memset(sb, 0, 1024);
+ memset(sb, 0, sizeof(sb));
break;
case IAC:
/* IAC IAC? That's probably not right. */
@@ -494,7 +494,7 @@ int main(int argc, char ** argv) {
}
} else if (sb_mode) {
/* Extended Option Mode -> Accept character */
- if (sb_len < 1023) {
+ if (sb_len < sizeof(sb) - 1) {
/* Append this character to the SB string,
* but only if it doesn't put us over
* our limit; honestly, we shouldn't hit
6c48e18a45221a83ca6&follow=1'>update scan file for fr-NantesChristoph Pfister1-6/+6 2010-05-16update scan file for de-HamburgChristoph Pfister1-0/+1 2010-05-09update scan file for de-UnitymediaChristoph Pfister1-8/+9 2010-05-02update scan file for hr-AllChristoph Pfister1-1/+1 2010-04-29update scan file for de-PrimacomChristoph Pfister1-0/+5 2010-04-29update scan file for dk-AllChristoph Pfister1-5/+11 2010-04-29update scan file for fi-TurkuChristoph Pfister1-1/+7 2010-04-29update scan file for uk-AberdareChristoph Pfister1-10/+15 2010-04-29update scan file for fr-NantesChristoph Pfister1-6/+6