summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2014-05-26 23:11:56 -0500
committerTim Angus <tim@ngus.net>2014-06-17 17:43:42 +0100
commita347f7157a64a9c96b55e6777da712254c5590b9 (patch)
tree52c7931b84e599a7f098df1b49104a02bbca1edc
parent6e25879416dbbc710b205b5019fa0de5d952b1d2 (diff)
Fix potential OOB in Windows Dedicated TTY CON_Show
Found by Coverity.
-rw-r--r--src/sys/con_win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sys/con_win32.c b/src/sys/con_win32.c
index d33afa54..1ef0c9a7 100644
--- a/src/sys/con_win32.c
+++ b/src/sys/con_win32.c
@@ -209,7 +209,7 @@ static void CON_Show( void )
{
if( i < qconsole_linelen )
{
- if( Q_IsColorString( qconsole_line + i ) )
+ if( i + 1 < qconsole_linelen && Q_IsColorString( qconsole_line + i ) )
attrib = CON_ColorCharToAttrib( *( qconsole_line + i + 1 ) );
line[ i ].Char.AsciiChar = qconsole_line[ i ];