mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'dop/topic/dopheide/vfmt-buf_len'
* dop/topic/dopheide/vfmt-buf_len: Fix logic error in vfmt() when growing the buffer
This commit is contained in:
commit
c1e5389929
3 changed files with 6 additions and 2 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
|||
5.2.0-dev.352 | 2022-11-21 09:10:28 -0700
|
||||
|
||||
* Fix logic error in vfmt() when growing the buffer (Michael Dopheide)
|
||||
|
||||
5.2.0-dev.350 | 2022-11-21 09:09:09 -0700
|
||||
|
||||
* Added NTLM challenge and response (nadavkluger)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
5.2.0-dev.350
|
||||
5.2.0-dev.352
|
||||
|
|
|
@ -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