From a347f7157a64a9c96b55e6777da712254c5590b9 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 26 May 2014 23:11:56 -0500 Subject: Fix potential OOB in Windows Dedicated TTY CON_Show Found by Coverity. --- src/sys/con_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ]; -- cgit