diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-02-17 19:03:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-17 16:03:52 -0800 |
| commit | a8da735ca4e0ed49796dda164c39e21aea4a7bc6 (patch) | |
| tree | e4b3f5dc18a11c83bd2253f6e4fe9bd1bc09419e /source | |
| parent | 92ccc8f17881d010f399b63aee80ba20bdc7095c (diff) | |
Allocate N+1 arrays instead of N to avoid out-of-bounds access when unzipping loops (#2663)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-autodiff-unzip.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-ir-autodiff-unzip.h b/source/slang/slang-ir-autodiff-unzip.h index eb8b09417..2d5261b63 100644 --- a/source/slang/slang-ir-autodiff-unzip.h +++ b/source/slang/slang-ir-autodiff-unzip.h @@ -588,7 +588,7 @@ struct DiffUnzipPass arrayType, builder.getIntValue( builder.getUIntType(), - region->maxIters)); + region->maxIters + 1)); } // Reverse the list since the indices needs to be |
