mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-05 16:51:27 +08:00
changed last sprintf to more secure snprintf to prevent vulnerability to buffer
overflow exploits.
This commit is contained in:
parent
9234817aa4
commit
3ef4e4da04
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user