[Kst] extragear/graphics/kst/src/plugins/shift
Nicolas Brisset
nicolas.brisset at eurocopter.com
Tue Jun 20 14:12:53 CEST 2006
SVN commit 553210 by brisset:
Protect against invalid inputs (don't read beyond the input vector's boundaries)
M +3 -0 shift.c
--- trunk/extragear/graphics/kst/src/plugins/shift/shift.c #553209:553210
@@ -17,6 +17,9 @@
}
delay=(int)inScalars[0];
+ /* Protect against invalid inputs */
+ if (delay > inArrayLens[0]) delay = inArrayLens[0];
+ if (delay < -inArrayLens[0]) delay = -inArrayLens[0];
/* First case: positive shift (forwards/right shift)*/
if (delay >= 0) {
More information about the Kst
mailing list