From 22c958dfdec4a8687c1d2fd9119f24809780e05d Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Fri, 15 Dec 2023 18:23:20 +0100 Subject: [PATCH] Fix ambiguous string syntax for PEid parsing regexp See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058741 --- peutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peutils.py b/peutils.py index 9170cb9..3bf2169 100644 --- a/peutils.py +++ b/peutils.py @@ -40,7 +40,7 @@ def __init__(self, filename=None, data=None): # RegExp to match a signature block # self.parse_sig = re.compile( - "\[(.*?)\]\s+?signature\s*=\s*(.*?)(\s+\?\?)*\s*ep_only\s*=\s*(\w+)(?:\s*section_start_only\s*=\s*(\w+)|)", + r"\[(.*?)\]\s+?signature\s*=\s*(.*?)(\s+\?\?)*\s*ep_only\s*=\s*(\w+)(?:\s*section_start_only\s*=\s*(\w+)|)", re.S, )