Skip to content

Commit

Permalink
Use int() instead of eval() for security
Browse files Browse the repository at this point in the history
  • Loading branch information
r888800009 committed Nov 3, 2023
1 parent 44daba6 commit a7f7624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyclibrary/c_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

def wrap_int(t):
logger.debug('wrap_int: {} {}'.format(t.dump(), type(t)))
t[0] = "CInt({})".format(eval(t[0]))
t[0] = "CInt({})".format(int(t[0], 0))
return t

class CInt(int):
Expand Down

0 comments on commit a7f7624

Please sign in to comment.