Fix for reading past allocated bounds when calculating paths

This commit is contained in:
Campbell Barton 2014-02-20 20:28:30 +11:00
parent 572a199a24
commit 47c55c5d43

@ -545,7 +545,7 @@ void calc_curvepath(Object *ob, ListBase *nurbs)
d = ((float)a) * fac; d = ((float)a) * fac;
/* we're looking for location (distance) 'd' in the array */ /* we're looking for location (distance) 'd' in the array */
while ((d >= *fp) && fp < maxdist) { while ((fp < maxdist) && (d >= *fp)) {
fp++; fp++;
if (bevp < bevplast) bevp++; if (bevp < bevplast) bevp++;
bevpn = bevp + 1; bevpn = bevp + 1;