commit 03091d6b9c1ee538e80abb4a6bf91b981ac2e6f0
parent 2daff223318e73c2f763dfd8f3582a04e98a341e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 5 Feb 2016 15:18:01 +0100
Fix an invalid memory access issue
The ssp_ran_hemisphere_uniform routine declared an 3D local sample while
4 dimensions were expected.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ssp.h b/src/ssp.h
@@ -427,7 +427,7 @@ ssp_ran_hemisphere_uniform
(struct ssp_rng* rng, const float up[3], float sample[4])
{
float basis[9];
- float sample_local[3];
+ float sample_local[4];
ASSERT(rng && up && sample && f3_is_normalized(up));
ssp_ran_hemisphere_uniform_local(rng, sample_local);
sample[3] = sample_local[3];