]> git.street.me.uk Git - andy/viking.git/commit - src/viktrwlayer_propwin.c
SF Bugs#100: Fix Crash on viewing Track Properties with extreme gradients.
authorRob Norris <rw_norris@hotmail.com>
Sat, 6 Jul 2013 10:16:29 +0000 (11:16 +0100)
committerRob Norris <rw_norris@hotmail.com>
Sun, 7 Jul 2013 10:42:42 +0000 (11:42 +0100)
commitf25c1cf82733e3a2e3efccc5d7193ad24b750da3
tree2e0026582db508b08962d297c95108df54f960d1
parenta87f8fa1508fea5fb89fa9075df8e139e22fdb3f
SF Bugs#100: Fix Crash on viewing Track Properties with extreme gradients.

Even though the code checked for end of the array, it did not set the index value correctly.
Thus it could access memory outside of the array, which could be zero and lead to divide by zero errors.

Refactor the code to use the common chunk index function.
src/viktrwlayer_propwin.c