From 52cede2e9f0eae3e6c65c65735ebad91256be732 Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 28 Jul 2022 02:16:42 +0000 Subject: [PATCH] Fix possible out-of-bounds access (reported by qqshka). git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6287 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_heightmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/gl/gl_heightmap.c b/engine/gl/gl_heightmap.c index 3640425e..d14f9af1 100644 --- a/engine/gl/gl_heightmap.c +++ b/engine/gl/gl_heightmap.c @@ -5020,7 +5020,7 @@ void QCBUILTIN PF_terrain_edit(pubprogfuncs_t *prinst, struct globalvars_s *pr_g { case ter_ent_get: { - int idx = G_INT(OFS_PARM1); + unsigned int idx = G_INT(OFS_PARM1); if (!mod->numentityinfo) Mod_ParseEntities(mod); if (idx >= mod->numentityinfo || !mod->entityinfo[idx].keyvals)