diff options
author | Greg Clayton <gclayton@apple.com> | 2016-06-10 20:09:33 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-06-10 20:09:33 +0000 |
commit | 16c56b391e8d7346edd086d6a9ed441d85eeac3b (patch) | |
tree | c33ca275defc238599139d3b7e43f2a6fc243215 /lldb/examples | |
parent | b5a64fe55fe684d9a1e2ebaefa6e69ed669c6583 (diff) |
Fixed a few places that were building a regex from an identifier without escaping the identifier text.
<rdar://problem/26090553>
Diffstat (limited to 'lldb/examples')
-rwxr-xr-x | lldb/examples/python/crashlog.py | 2 | ||||
-rwxr-xr-x | lldb/examples/python/symbolication.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index 60a6a1f50f0..a557b604afb 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -452,7 +452,7 @@ class CrashLog(symbolication.Symbolicator): for image in self.images: if image.identifier == identifier: return image - regex_text = '^.*\.%s$' % (identifier) + regex_text = '^.*\.%s$' % (re.escape(identifier)) regex = re.compile(regex_text) for image in self.images: if regex.match(image.identifier): diff --git a/lldb/examples/python/symbolication.py b/lldb/examples/python/symbolication.py index 2f2a274dbc4..88846c99b3a 100755 --- a/lldb/examples/python/symbolication.py +++ b/lldb/examples/python/symbolication.py @@ -448,7 +448,7 @@ class Symbolicator: if image.identifier == identifier: images.append(image) if len(images) == 0: - regex_text = '^.*\.%s$' % (identifier) + regex_text = '^.*\.%s$' % (re.escape(identifier)) regex = re.compile(regex_text) for image in self.images: if regex.match(image.identifier): |