mirror of
https://github.com/intel/isa-l.git
synced 2024-12-12 09:23:50 +01:00
igzip_cli: fix for potential buffer overrun on 'outfile_name' buffer with strncat()
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
This commit is contained in:
parent
722144ee75
commit
08f021c43f
@ -596,7 +596,7 @@ int compress_file(void)
|
|||||||
allocated_name = malloc_safe(outfile_name_len + 1);
|
allocated_name = malloc_safe(outfile_name_len + 1);
|
||||||
outfile_name = allocated_name;
|
outfile_name = allocated_name;
|
||||||
strncpy(outfile_name, infile_name, infile_name_len + 1);
|
strncpy(outfile_name, infile_name, infile_name_len + 1);
|
||||||
strncat(outfile_name, suffix, outfile_name_len + 1);
|
strncat(outfile_name, suffix, suffix_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
open_in_file(&in, infile_name);
|
open_in_file(&in, infile_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user