Mercurial > pysmcl
changeset 206:43ad3e80db15
bad_calls: now forbidding subscripting with secret values
author | Sigurd Meldgaard <stm@daimi.au.dk> |
---|---|
date | Mon, 21 Dec 2009 11:59:25 +0100 |
parents | b406cd25f674 |
children | caf5c50b89d0 |
files | pysmcl/bad_calls.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pysmcl/bad_calls.py Mon Dec 21 11:58:41 2009 +0100 +++ b/pysmcl/bad_calls.py Mon Dec 21 11:59:25 2009 +0100 @@ -17,3 +17,6 @@ elif(any([expr_secret(i, e) for i in node.args])): util.error("Call of non-secret " "function with secret argument", node) + if(isinstance(node, ast.Subscript) + and expr_secret(node.slice,e)): + util.error("Secret array indexing is not allowed", node)