mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
Fixes #1969. The points-to analysis does not know that the assignment `input = raw_input` cannot fail under Python 2, and so there are two possible values that `input` could point-to after exiting the exception handler: the built-in `input`, or the built-in `raw_input`. In the latter case we do not want to report the alert, and so adding a check that the given function does not point-to the built-in `raw_input` suffices.
11 lines
118 B
Python
11 lines
118 B
Python
try:
|
|
input = raw_input
|
|
except NameError:
|
|
pass
|
|
|
|
def use_of_input():
|
|
return input()
|
|
|
|
print(use_of_input())
|
|
|