Commit ebb8c2d5 authored by Steve Dower's avatar Steve Dower

Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls

parent 7a82afee
......@@ -246,7 +246,8 @@ class MimeTypes:
except EnvironmentError:
break
else:
yield ctype
if '\0' not in ctype:
yield ctype
i += 1
with _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT, '') as hkcr:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment