summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2015-07-21 22:51:34 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2015-07-21 22:51:34 +0300
commit6f05b8008c883e9898c1582a72b5b96db940943c (patch)
tree2101ee38001571e3dc0715aa6d23abc51ac607c1
parentbd628dedeaedb2fa55f9592222caca73deb741c0 (diff)
downloadnasm-6f05b8008c883e9898c1582a72b5b96db940943c.tar.gz
output: outmacho32 -- Fix stack overwrite
The size of address migh be up to 8 bytes here so allocate enough stack space. http://bugzilla.nasm.us/show_bug.cgi?id=3392317 Reported-by: Kyle Brodie <kylecbrodie@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--output/outmac32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/output/outmac32.c b/output/outmac32.c
index 0cd06ef0..0ed88c99 100644
--- a/output/outmac32.c
+++ b/output/outmac32.c
@@ -373,7 +373,7 @@ static void macho_output(int32_t secto, const void *data,
{
struct section *s, *sbss;
int32_t addr;
- uint8_t mydata[4], *p;
+ uint8_t mydata[8], *p;
if (wrt != NO_SEG) {
wrt = NO_SEG;