[iortcw] 125/497: All: Fix potential OOB in Windows Dedicated TTY CON_Show

Simon McVittie smcv at debian.org
Fri Sep 8 10:36:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit f6da407c7781c0b735d6b51a0673190daf498aa2
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Tue May 27 07:23:55 2014 +0000

    All: Fix potential OOB in Windows Dedicated TTY CON_Show
---
 MP/code/sys/con_win32.c | 2 +-
 SP/code/sys/con_win32.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MP/code/sys/con_win32.c b/MP/code/sys/con_win32.c
index ea64e01..454012e 100644
--- a/MP/code/sys/con_win32.c
+++ b/MP/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 ];
diff --git a/SP/code/sys/con_win32.c b/SP/code/sys/con_win32.c
index ea64e01..454012e 100644
--- a/SP/code/sys/con_win32.c
+++ b/SP/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 ];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list