From fab65c3339608f5e0b7686965d740f0952aac05c Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Thu, 7 May 2020 00:11:15 -0400 Subject: better guard rails for some python apis --- python/binaryview.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/binaryview.py') 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): (, '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): -- cgit v1.3.1