From 03cb51a2366ee938282ebcb8b7288c953b5ba5ff Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Mon, 17 May 2010 01:57:30 +0000 Subject: [PATCH] Fix out of bounds read. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3533 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/client/console.c b/engine/client/console.c index afb1ee671..65418d1e9 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -1058,7 +1058,7 @@ static int Con_LineBreaks(conchar_t *start, conchar_t *end, int scrwidth, int ma // for (l=0 ; l<40 && *start && *start != '\n'; l++) // start++; - if ((*start&CON_CHARMASK) == '\n'||!l) + if (start < end && (*start&CON_CHARMASK) == '\n'||!l) start++; // skip the \n }