summaryrefslogtreecommitdiffstats
path: root/externals
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-05-28 19:18:54 +0200
committerGitHub <noreply@github.com>2023-05-28 19:18:54 +0200
commitb26018e2e6835eb9968e29e573afcda6d9584cf9 (patch)
tree3b149afcaeca7948c826cb326c46582c0b9dddff /externals
parentMerge pull request #10483 from ameerj/gl-cpu-astc (diff)
parentmicroprofile: Avoid crashing due to OOB stack pos (diff)
downloadyuzu-b26018e2e6835eb9968e29e573afcda6d9584cf9.tar
yuzu-b26018e2e6835eb9968e29e573afcda6d9584cf9.tar.gz
yuzu-b26018e2e6835eb9968e29e573afcda6d9584cf9.tar.bz2
yuzu-b26018e2e6835eb9968e29e573afcda6d9584cf9.tar.lz
yuzu-b26018e2e6835eb9968e29e573afcda6d9584cf9.tar.xz
yuzu-b26018e2e6835eb9968e29e573afcda6d9584cf9.tar.zst
yuzu-b26018e2e6835eb9968e29e573afcda6d9584cf9.zip
Diffstat (limited to 'externals')
-rw-r--r--externals/microprofile/microprofile.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/externals/microprofile/microprofile.h b/externals/microprofile/microprofile.h
index 639f3618c..8f75a25aa 100644
--- a/externals/microprofile/microprofile.h
+++ b/externals/microprofile/microprofile.h
@@ -1697,7 +1697,13 @@ void MicroProfileFlip()
{
int nTimer = MicroProfileLogTimerIndex(LE);
uint8_t nGroup = pTimerToGroup[nTimer];
- MP_ASSERT(nStackPos < MICROPROFILE_STACK_MAX);
+
+ // To avoid crashing due to OOB memory accesses/asserts
+ // simply skip this iteration
+ // MP_ASSERT(nStackPos < MICROPROFILE_STACK_MAX);
+ if (nStackPos >= MICROPROFILE_STACK_MAX) {
+ break;
+ }
MP_ASSERT(nGroup < MICROPROFILE_MAX_GROUPS);
pGroupStackPos[nGroup]++;
pStack[nStackPos++] = k;