diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2020-05-07 00:11:15 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2020-05-07 00:11:15 -0400 |
| commit | fab65c3339608f5e0b7686965d740f0952aac05c (patch) | |
| tree | cd3196a34f186b56a5748f267baba241a75bb872 /python/binaryview.py | |
| parent | c0ec47186980e24bf9273c889599799e59b42ac7 (diff) | |
better guard rails for some python apis
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index ff9b400f..0f747232 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4577,6 +4577,8 @@ class BinaryView(object): (<type: int32_t>, 'foo') >>> """ + if not isinstance(text, str): + raise AttributeError("Text must be a string") result = core.BNQualifiedNameAndType() errors = ctypes.c_char_p() if not core.BNParseTypeString(self.handle, text, result, errors): |
