_Py_normalize_encoding(): explain how the value 6 was computed

This commit is contained in:
Victor Stinner 2013-11-07 23:12:23 +01:00
parent bd303c165b
commit 66b3270975

View file

@ -2983,6 +2983,7 @@ _Py_normalize_encoding(const char *encoding,
char *l_end;
if (encoding == NULL) {
/* 6 == strlen("utf-8") + 1 */
if (lower_len < 6)
return 0;
strcpy(lower, "utf-8");