From a1c4df267cf0761d7411fd94869814b355865c7f Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 6 Jun 2015 15:04:17 +0000 Subject: [PATCH] Fix an out-of-bounds read in getpskyidx(). git-svn-id: https://svn.eduke32.com/eduke32@5263 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/build.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 3232d19ea..280d25163 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -740,7 +740,7 @@ FORCE_INLINE int32_t getpskyidx(int32_t picnum) { int32_t j; - for (j=pskynummultis; j>0; j--) // NOTE: j==0 on non-early loop end + for (j=pskynummultis-1; j>0; j--) // NOTE: j==0 on non-early loop end if (picnum == multipskytile[j]) break; // Have a match.