[issue10604] Allocating too much memory for pathes

Daniel Molkentin report at bugs.python.org
Thu Dec 2 13:32:35 CET 2010


New submission from Daniel Molkentin <daniel at molkentin.de>:

from PC/getpathp.c:538


    if (pythonhome != NULL) {
        char *p;
        bufsz = 1;
        for (p = PYTHONPATH; *p; p++) {
            if (*p == DELIM)
                bufsz++; /* number of DELIM plus one */
        }
        bufsz *= strlen(pythonhome);
    }

The second last line should probably read

        bufsz += strlen(pythonhome);

----------
components: Windows
messages: 123067
nosy: danimo
priority: normal
severity: normal
status: open
title: Allocating too much memory for pathes
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10604>
_______________________________________


More information about the Python-bugs-list mailing list