summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2014-05-13 19:29:32 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2014-05-13 19:29:32 +0200
commitf6936562b27f5716fa82c4d29767932319d211c0 (patch)
treec89170659936b77f0b439f64503f56973a3eff7f
parentcb87c41f282dccc1b3649e3ea3fb80d19f820310 (diff)
downloadgf-complete-f6936562b27f5716fa82c4d29767932319d211c0.tar.gz
gf_w32.c: fix dereference of undefined pointer value
Check for array boundaries of 't' in while loop header. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r--src/gf_w32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gf_w32.c b/src/gf_w32.c
index 8f7790c..0718ce5 100644
--- a/src/gf_w32.c
+++ b/src/gf_w32.c
@@ -1482,7 +1482,7 @@ gf_w32_split_16_32_lazy_multiply_region(gf_t *gf, void *src, void *dest, uint32_
p = (xor) ? *d32 : 0;
a = *s32;
i = 0;
- while (a != 0) {
+ while (a != 0 && i < 2) {
v = (a & 0xffff);
p ^= t[i][v];
a >>= 16;