STINNER Victor <victor.stin...@haypocalc.com> added the comment:

r86399 fixes the code checking PyUnicode_AsWideChar() failure.

The following change is useless, it cannot overflow:

-    if (n + k > MAXPATHLEN)
+    if (k > MAXPATHLEN - n)
         k = MAXPATHLEN - n;

n and k maximum values are MAXPATHLEN (and the maximum value of MAXPATHLEN is 
4096), whereas n and k type maximum values are at least 2^31.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10308>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to