From 36dab01cab41dbb8cd6f281051d04e1bc1b4d596 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Mon, 28 Jul 2008 08:45:38 +0000 Subject: [PATCH] - Don't check outside of the array bounds - Spotted by Marcelo Slomp See issue #3593 for more details. svn path=/trunk/; revision=34892 --- reactos/base/services/tcpsvcs/chargen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/base/services/tcpsvcs/chargen.c b/reactos/base/services/tcpsvcs/chargen.c index 7d7d829db87..2f2b17124bd 100644 --- a/reactos/base/services/tcpsvcs/chargen.c +++ b/reactos/base/services/tcpsvcs/chargen.c @@ -74,7 +74,7 @@ GenerateChars(SOCKET sock) line[i] = chars[charIndex]; /* if we hit the end char, reset it */ - if (chars[charIndex] == chars[NUM_CHARS]) + if (chars[charIndex] == chars[NUM_CHARS - 1]) charIndex = 0; else charIndex++;