Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-22 06:03:00 +0300
committerJeroen Bakker <jeroen@blender.org>2020-12-02 10:29:23 +0300
commit22c0555cc55a8581fb427aa1b14dbc0f06e77bae (patch)
tree6dedbe1fd166a9877e8b5f2650a03f9fb4b13b2a /source
parent712f79b0fe1800b3cdb94a42a2a0195433a983fa (diff)
Fix out of bounds array access in mathutils.noise
Regression in 0b2d1badecc48.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/mathutils/mathutils_noise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
index 8ec0c9ce44a..53656c4dcb2 100644
--- a/source/blender/python/mathutils/mathutils_noise.c
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -140,11 +140,11 @@ static void next_state(void)
left = N;
next = state;
- for (j = N - M + 1; j--; p++) {
+ for (j = N - M + 1; --j; p++) {
*p = p[M] ^ TWIST(p[0], p[1]);
}
- for (j = M; j--; p++) {
+ for (j = M; --j; p++) {
*p = p[M - N] ^ TWIST(p[0], p[1]);
}