Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#38 application error with too long folder names

closed-accepted
nobody
None
5
2004-02-19
2004-02-09
Ralf Sieger
No

Hi,

when executing an py2exe (console) executable in an path
which exceedes 132 characters an application error
is created. 130 characters work fine 131 character
produces no output at all.

folders with 132 characters or more eg:
c:\aaa[132 times]\test.exe

Environment:
W2k SP3
Python 2.3.3
py2exe 0.5.0

Regards,

Ralf

Discussion

  • Ralf Sieger
    Ralf Sieger
    2004-02-12

    Logged In: YES
    user_id=971521

    Hi,

    I looked into the source and found the cause of the problem:
    in start.c (101):
    the line
    char buffer[_MAX_PATH + 32];
    should be changed into:
    char buffer[_MAX_PATH * 3 + _MAX_FNAME + _MAX_EXT];

    as on too long path names the call to:
    sprintf(buffer, "PYTHONPATH=%s;%s\\%s",
    libdirname, libdirname, pZipBaseName);

    will otherwise produce an buffer overrun

    Regards,

    Ralf

     
  • Thomas Heller
    Thomas Heller
    2004-02-19

    Logged In: YES
    user_id=11105

    You are right - this is indeed a bug ;-)

    Thanks for finding and fixing it - I will change the code in
    CVS and release 0.5.1 rsn.

     
  • Thomas Heller
    Thomas Heller
    2004-02-19

    • status: open --> closed-accepted