From: Thomas Debesse Date: Tue, 14 Jan 2020 09:34:48 +0000 (+0100) Subject: q3map2/vis: do not read outside of script before detecting end of script X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eac826a238ff6868c813509c12397a4924f5854c;p=xonotic%2Fnetradiant.git q3map2/vis: do not read outside of script before detecting end of script --- diff --git a/tools/quake3/common/scriplib.c b/tools/quake3/common/scriplib.c index 3c91386c..e17124eb 100644 --- a/tools/quake3/common/scriplib.c +++ b/tools/quake3/common/scriplib.c @@ -199,7 +199,7 @@ qboolean GetToken( qboolean crossline ){ // skip space // skipspace: - while ( *script->script_p <= 32 ) + while ( script->script_p < script->end_p && *script->script_p <= 32 ) { if ( script->script_p >= script->end_p ) { return EndOfScript( crossline );