diff options
author | Ed Beroset <beroset@mindspring.com> | 2004-12-15 17:10:25 +0000 |
---|---|---|
committer | Ed Beroset <beroset@mindspring.com> | 2004-12-15 17:10:25 +0000 |
commit | 83b2809a03743310b4f44ab2d135776708ee9b25 (patch) | |
tree | 09a248e920e4a3f511ae8fa84d0908980a664afd | |
parent | 19f927ac642f2ef69d2e971639a4678409b2b9d4 (diff) | |
download | nasm-83b2809a03743310b4f44ab2d135776708ee9b25.tar.gz |
changed sprintf to more secure snprintf to prevent vulnerability to buffer
overflow exploits.
-rw-r--r-- | nasm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |