Hello, I am using (well, trying to use for the moment) LeoCAD for Linux and I have a problem since 0.75.2. Pasting can make the program crash.
How to reproduce: - start leocad, - insert a piece, - copy, - paste. The problem seems to be located in project.cpp, line 4738, in the Project::HandleCommand function, case LC_EDIT_PASTE. The name variable is too small. If you grep 'char.*\[9\]', you will find several other possible occurrences of the same problem: common/library.cpp:1156: char TexName[9]; common/library.cpp:1251: char* p, NewTexName[9]; common/library.cpp:1295: char TexName[9]; common/library.h:148: char name[9]; common/pieceinf.cpp:385: char name[9]; common/project.cpp:525: char name[9]; common/project.cpp:1084: char name[9]; common/project.cpp:4738: char name[9]; common/texture.h:38: char m_strName[9]; tools/convert/convert.c:38: char name[9]; tools/convert/convert.c:47:char _strName[9]; tools/convert/convert.c:65: char tmp[9]; tools/convert/convert.c:1308: char buf[100], f1[9], f2[9], *ptr, *ptr2; tools/convert/texture.cpp:21: char name[9]; tools/update/update.cpp:16: char oldname[9]; tools/update/update.cpp:17: char newname[9]; tools/update/update.cpp:22: char name[9]; tools/update/update.cpp:281: char buf[100], f1[9], f2[9], *ptr, *ptr2; win/Cadview.cpp:491: char dbuffer [9]; win/Cadview.cpp:500: char tbuffer [9]; win/Piecebar.cpp:833: char ParentName[9]; I did not find any 'New ticket' on the trac page, so I post it here. Thanks for LeoCAD! Nicolas. _______________________________________________ Leocad mailing list [email protected] https://list.gerf.org/listinfo/leocad
