Fix segfaults when using filename paths greater than 1024 characters in length - use String * and heap instead of fixed size static char array buffers.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-18 00:45:18 +00:00
commit d918bddfc0
12 changed files with 100 additions and 78 deletions

View file

@ -763,8 +763,11 @@ public:
Printf(f_directors, "/* ---------------------------------------------------\n");
Printf(f_directors, " * C++ director class methods\n");
Printf(f_directors, " * --------------------------------------------------- */\n\n");
if (outfile_h)
Printf(f_directors, "#include \"%s\"\n\n", Swig_file_filename(outfile_h));
if (outfile_h) {
String *filename = Swig_file_filename(outfile_h);
Printf(f_directors, "#include \"%s\"\n\n", filename);
Delete(filename);
}
}
/* If shadow classing is enabled, we're going to change the module name to "_module" */