From: Victor Stinner Date: Thu, 7 Nov 2013 22:12:23 +0000 (+0100) Subject: _Py_normalize_encoding(): explain how the value 6 was computed X-Git-Tag: v3.4.0b1~342 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66b3270975ebf33596559d70549ea66d1dfd9d9c;p=thirdparty%2FPython%2Fcpython.git _Py_normalize_encoding(): explain how the value 6 was computed --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1375ef3093d7..224a80b45e4d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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");