Author: gedmurphy
Date: Mon Jul 28 03:45:38 2008
New Revision: 34892
URL:
http://svn.reactos.org/svn/reactos?rev=34892&view=rev
Log:
- Don't check outside of the array bounds
- Spotted by Marcelo Slomp <mslomp at linuxmail dot org>
See issue #3593 for more details.
Modified:
trunk/reactos/base/services/tcpsvcs/chargen.c
Modified: trunk/reactos/base/services/tcpsvcs/chargen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/char…
==============================================================================
--- trunk/reactos/base/services/tcpsvcs/chargen.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/tcpsvcs/chargen.c [iso-8859-1] Mon Jul 28 03:45:38 2008
@@ -74,7 +74,7 @@
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++;