diff options
author | Ed Beroset <beroset@mindspring.com> | 2004-12-15 18:30:54 +0000 |
---|---|---|
committer | Ed Beroset <beroset@mindspring.com> | 2004-12-15 18:30:54 +0000 |
commit | 3ef4e4da041951827359396b95f46c5631b20fcc (patch) | |
tree | 02cec3a91b9df74ac6429ffad226212e6f8d7b05 /preproc.c | |
parent | 9234817aa44ba7436ea51c556f3aeca316f28ae7 (diff) | |
download | nasm-3ef4e4da041951827359396b95f46c5631b20fcc.tar.gz nasm-3ef4e4da041951827359396b95f46c5631b20fcc.tar.bz2 nasm-3ef4e4da041951827359396b95f46c5631b20fcc.zip |
changed last sprintf to more secure snprintf to prevent vulnerability to buffer
overflow exploits.
Diffstat (limited to 'preproc.c')
-rw-r--r-- | preproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -528,7 +528,7 @@ prepreproc(char *line) fname++; fnlen = strcspn(fname, "\""); line = nasm_malloc(20 + fnlen); - sprintf(line, "%%line %d %.*s", lineno, fnlen, fname); + snprintf(line, 20+fnlen,"%%line %d %.*s", lineno, fnlen, fname); nasm_free(oldline); } if (tasm_compatible_mode) |