highy_float = convy_float;
for (i = 0; i < heightout; i++) {
+ /* Clamp here to be sure we don't read beyond input buffer. */
+ if (highy_int >= heightin)
+ highy_int = heightin - 1;
lowx_int = 0;
lowx_float = 0;
highx_int = convx_int;
totals[k] += (GLubyte)(*(temp_index)) * percent;
}
- /* calculate the value for pixels in the last row */
+ /* calculate the value for pixels in the last row */
y_percent = highy_float;
percent = y_percent * (1-lowx_float);
temp = (const char *)datain + xindex + highy_int * ysize;
highy_float = convy_float;
for (i = 0; i < heightout; i++) {
+ /* Clamp here to be sure we don't read beyond input buffer. */
+ if (highy_int >= heightin)
+ highy_int = heightin - 1;
lowx_int = 0;
lowx_float = 0;
highx_int = convx_int;
highy_float = convy_float;
for (i = 0; i < heightout; i++) {
+ /* Clamp here to be sure we don't read beyond input buffer. */
+ if (highy_int >= heightin)
+ highy_int = heightin - 1;
lowx_int = 0;
lowx_float = 0;
highx_int = convx_int;
highy_float = convy_float;
for (i = 0; i < heightout; i++) {
+ /* Clamp here to be sure we don't read beyond input buffer. */
+ if (highy_int >= heightin)
+ highy_int = heightin - 1;
lowx_int = 0;
lowx_float = 0;
highx_int = convx_int;
highy_float = convy_float;
for (i = 0; i < heightout; i++) {
+ /* Clamp here to be sure we don't read beyond input buffer. */
+ if (highy_int >= heightin)
+ highy_int = heightin - 1;
lowx_int = 0;
lowx_float = 0;
highx_int = convx_int;
highy_float = convy_float;
for (i = 0; i < heightout; i++) {
+ /* Clamp here to be sure we don't read beyond input buffer. */
+ if (highy_int >= heightin)
+ highy_int = heightin - 1;
lowx_int = 0;
lowx_float = 0;
highx_int = convx_int;
highy_float = convy_float;
for (i = 0; i < heightout; i++) {
+ /* Clamp here to be sure we don't read beyond input buffer. */
+ if (highy_int >= heightin)
+ highy_int = heightin - 1;
lowx_int = 0;
lowx_float = 0;
highx_int = convx_int;