From 347b429fdb7cc6235b2bf9a6237acb47b20ebaf7 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 26 May 2014 23:11:56 -0500 Subject: [PATCH] Fix potential OOB in Windows Dedicated TTY CON_Show Found by Coverity. --- code/sys/con_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/sys/con_win32.c b/code/sys/con_win32.c index ea64e013..454012e0 100644 --- a/code/sys/con_win32.c +++ b/code/sys/con_win32.c @@ -208,7 +208,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 ];