nasm.c: fix stack overrun in assemble_file
commit8bec2c788f3432f24788a2e7487486e20543e063
authorH. Peter Anvin <hpa@zytor.com>
Sat, 8 Aug 2009 20:49:00 +0000 (8 13:49 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 8 Aug 2009 20:49:00 +0000 (8 13:49 -0700)
tree8c50c042f074a1856d402904019b993bd3aa3c8d
parentf903da144d8d521cacf2789a5b6755d9cb63b0d9
nasm.c: fix stack overrun in assemble_file

If [DEBUG id] has id longer then 80 symbols (well, 79 actually plus
EOS) then stack will be just overwritten.

Fix it with explicit check for identifier being too long.

Based on an initial version by Cyrill Gorcunov <gorcunov@gmail.com>.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
nasm.c