Commit df23e30b authored by Victor Stinner's avatar Victor Stinner

Fix _Py_normalize_encoding(): ensure that buffer is big enough to store "utf-8"

if the input string is NULL
parent e75fc148
......@@ -2983,6 +2983,8 @@ _Py_normalize_encoding(const char *encoding,
char *l_end;
if (encoding == NULL) {
if (lower_len < 6)
return 0;
strcpy(lower, "utf-8");
return 1;
}
......
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