i tried this script

@r@
position p1;
identifier  arr;
constant i , var;
type T;
@@
 T arr[var];
... when != (i < var/ )
...
* arr[i]@p1

2015-05-21 23:13 GMT+02:00 SF Markus Elfring <[email protected]>
:

> > the script must detect an error on ( T[20] = 5 ;)
> > because there is an overflow of the array size.
>
> Did you experiment with any SmPL script already?
>
>
> > any suggestions please to implement this script ?
>
> Would you like to analyse affected source code
> only with constant array indexes?
>
> Do you need to check for inappropriate numbers with
> a bit of additional Python or OCaml programming?
>
> Regards,
> Markus
>
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to