mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Fix logic error in vfmt() when growing the buffer
This commit is contained in:
parent
a0659994f0
commit
e47b055769
1 changed files with 1 additions and 1 deletions
|
@ -1630,7 +1630,7 @@ const char* vfmt(const char* format, va_list al)
|
|||
va_copy(alc, al);
|
||||
int n = vsnprintf(buf, buf_len, format, al);
|
||||
|
||||
if ( n > 0 && buf_len < n )
|
||||
if ( n > 0 && buf_len <= n )
|
||||
{ // Not enough room, grow the buffer.
|
||||
buf_len = n + 32;
|
||||
buf = (char*)safe_realloc(buf, buf_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue