summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Beroset <beroset@mindspring.com>2004-12-15 16:45:46 +0000
committerEd Beroset <beroset@mindspring.com>2004-12-15 16:45:46 +0000
commitec2e10cfea0c3421f88fdcd7b87e926212abbf50 (patch)
treef513f02738c256aaded32a8858a67cb8844497f9
parente0c059ab4e1e5d471372aa42caa57573de912655 (diff)
downloadnasm-ec2e10cfea0c3421f88fdcd7b87e926212abbf50.tar.gz
replaced vsprintf() with vsnprintf() to avoid buffer overflow exploit
-rw-r--r--preproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/preproc.c b/preproc.c
index 0c209b5f..bf5c61da 100644
--- a/preproc.c
+++ b/preproc.c
@@ -4086,7 +4086,7 @@ error(int severity, const char *fmt, ...)
return;
va_start(arg, fmt);
- vsprintf(buff, fmt, arg);
+ vsnprintf(buff, 1024, fmt, arg);
va_end(arg);
if (istk && istk->mstk && istk->mstk->name)