mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
changed last sprintf to more secure snprintf to prevent vulnerability to buffer
overflow exploits.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user