projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update.
[chise/xemacs-chise.git-]
/
src
/
unexcw.c
diff --git
a/src/unexcw.c
b/src/unexcw.c
index
1b8ad08
..
81a38b1
100644
(file)
--- a/
src/unexcw.c
+++ b/
src/unexcw.c
@@
-54,6
+54,7
@@
unexec (char *, char *, void *, void *, void *)
#include <a.out.h>
#endif
#include <a.out.h>
#endif
+#define STACK_SIZE 0x800000
#define ALLOC_UNIT 0xFFFF
#define ALLOC_MASK ~((unsigned long)(ALLOC_UNIT))
#define ALIGN_ALLOC(addr) \
#define ALLOC_UNIT 0xFFFF
#define ALLOC_MASK ~((unsigned long)(ALLOC_UNIT))
#define ALIGN_ALLOC(addr) \
@@
-340,6
+341,9
@@
copy_executable_and_dump_data_section (int a_out, int a_new)
}
f_ohdr.dsize=new_data_size;
f_ohdr.bsize=BSS_PAD_SIZE;
}
f_ohdr.dsize=new_data_size;
f_ohdr.bsize=BSS_PAD_SIZE;
+ /* Prevent stack overflow with regexp usage. */
+ f_ohdr.SizeOfStackReserve = STACK_SIZE;
+
if (write(a_new, &f_ohdr, sizeof(f_ohdr)) != sizeof(f_ohdr))
{
PERROR("failed to write optional header");
if (write(a_new, &f_ohdr, sizeof(f_ohdr)) != sizeof(f_ohdr))
{
PERROR("failed to write optional header");