mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Fix buffer sizes in the rotate_file function
The "tmpname" contains a longer string than "newname", so adjust sizes accordingly.
This commit is contained in:
parent
3a66bc7c9d
commit
38ff76a176
1 changed files with 1 additions and 1 deletions
|
@ -1272,7 +1272,7 @@ FILE* rotate_file(const char* name, RecordVal* rotate_info)
|
|||
// Build file names.
|
||||
const int buflen = strlen(name) + 128;
|
||||
|
||||
char tmpname[buflen], newname[buflen+4];
|
||||
char newname[buflen], tmpname[buflen+4];
|
||||
|
||||
safe_snprintf(newname, buflen, "%s.%d.%.06f.tmp",
|
||||
name, getpid(), network_time);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue