summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2013-05-06 23:43:43 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2013-05-06 23:43:43 +0400
commitce6527459f0144a57fc628e0c978594daf1db281 (patch)
treeac325ed7e5c423e95f5f2df819c32df4f0ce23cb /preproc.c
parent1ac3459539fd8d499e23d1c776dfe2642c1c331f (diff)
downloadnasm-ce6527459f0144a57fc628e0c978594daf1db281.tar.gz
nasm-ce6527459f0144a57fc628e0c978594daf1db281.tar.bz2
nasm-ce6527459f0144a57fc628e0c978594daf1db281.zip
BR3392253: Fix potential buffer overflow in number conversion
Reported-by: franck.uberto@esrf.fr Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/preproc.c b/preproc.c
index 8984a52..e2b12e4 100644
--- a/preproc.c
+++ b/preproc.c
@@ -5206,7 +5206,7 @@ static void pp_extra_stdmac(macros_t *macros)
static void make_tok_num(Token * tok, int64_t val)
{
- char numbuf[20];
+ char numbuf[32];
snprintf(numbuf, sizeof(numbuf), "%"PRId64"", val);
tok->text = nasm_strdup(numbuf);
tok->type = TOK_NUMBER;