This bug caught my attention as I couldn't imagine what kind of system
would cause it but it was easy enough to reproduce on my ubuntu system
(and fix). The trunk patch below prevents a memory fault but doesn't
do anything useful with the error (except inform the user that
LD_LIBRARY_PATH is absurdly long). The error could also occur if the
_MEIPASS2 environment variable was particularly long. I'd be happy to
test another patch for this bug.
Index: source/linux/main.c
===================================================================
--- source/linux/main.c (revision 705)
+++ source/linux/main.c (working copy)
@@ -37,14 +37,22 @@
};
#endif
+#define _MAX_LD_LIBRARY_PATH (_MAX_PATH * 4 + 12)
+
void exportWorkpath(char *workpath, char *envvar_name)
{
- char envvar[_MAX_PATH * 4 + 12];
+ char envvar[_MAX_LD_LIBRARY_PATH];
char *old_envvar;
strcpy(envvar, workpath);
old_envvar = getenv(envvar_name);
if (old_envvar) {
+ if( strlen(old_envvar) + strlen(envvar) + 1
+ >=_MAX_LD_LIBRARY_PATH ) {
+ fprintf(stderr,"Too many characters in LD_LIBRARY_PATH
\n");
+ fprintf(stderr,"Quitting...\n");
+ exit(1);
+ }
strcat(envvar, ":");
strcat(envvar, old_envvar);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pyinstaller?hl=en
-~----------~----~----~----~------~----~------~--~---