summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Beroset <beroset@mindspring.com>2004-12-15 17:10:25 +0000
committerEd Beroset <beroset@mindspring.com>2004-12-15 17:10:25 +0000
commit83b2809a03743310b4f44ab2d135776708ee9b25 (patch)
tree09a248e920e4a3f511ae8fa84d0908980a664afd
parent19f927ac642f2ef69d2e971639a4678409b2b9d4 (diff)
downloadnasm-83b2809a03743310b4f44ab2d135776708ee9b25.tar.gz
changed sprintf to more secure snprintf to prevent vulnerability to buffer
overflow exploits.
-rw-r--r--nasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nasm.c b/nasm.c
index e6be9256..07fe30a6 100644
--- a/nasm.c
+++ b/nasm.c
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
/* define some macros dependent of command-line */
{
char temp [64];
- sprintf (temp, "__OUTPUT_FORMAT__=%s\n", ofmt->shortname);
+ snprintf (temp, sizeof(temp), "__OUTPUT_FORMAT__=%s\n", ofmt->shortname);
pp_pre_define (temp);
}