From 246f1f72ad2418930ac8837f0788d09a2b24ee6b Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Wed, 2 Jul 2025 23:48:32 -0400 Subject: Add outlining support for wmemcpy. --- python/binaryview.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index 7b14b57b..16c2dbfb 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -10141,11 +10141,12 @@ to a the type "tagRECT" found in the typelibrary "winX64common" """ return MemoryMap(handle=self.handle) - def stringify_unicode_data(self, arch: Optional['architecture.Architecture'], buffer: 'databuffer.DataBuffer', allow_short_strings: bool = False) -> Tuple[Optional[str], Optional[StringType]]: + def stringify_unicode_data(self, arch: Optional['architecture.Architecture'], buffer: 'databuffer.DataBuffer', null_terminates: bool = True, allow_short_strings: bool = False) -> Tuple[Optional[str], Optional[StringType]]: """ ``stringify_unicode_data`` converts a buffer of unicode data into a string representation. :param arch: The architecture to use for stringification, or None to use the current architecture of the BinaryView :param buffer: The DataBuffer containing the unicode data to stringify + :param null_terminates: If True, stops stringification at the first null character, otherwise continues until the end of the buffer :param allow_short_strings: If True, allows short strings to be returned, otherwise only long strings are returned :return: A tuple containing the string representation and its type, or (None, None) if the stringification fails :rtype: Tuple[Optional[str], Optional[StringType]] @@ -10156,7 +10157,7 @@ to a the type "tagRECT" found in the typelibrary "winX64common" string_type = ctypes.c_int() if arch is not None: arch = arch.handle - if not core.BNStringifyUnicodeData(self.handle, arch, buffer.handle, allow_short_strings, ctypes.byref(string), ctypes.byref(string_type)): + if not core.BNStringifyUnicodeData(self.handle, arch, buffer.handle, null_terminates, allow_short_strings, ctypes.byref(string), ctypes.byref(string_type)): return None, None result = string.value.decode('utf-8') core.free_string(string) -- cgit v1.3.1