mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix mis-usage of string::append that leads to an overflow
This commit is contained in:
parent
404fed6923
commit
58cb9163d1
1 changed files with 1 additions and 1 deletions
|
@ -2508,7 +2508,7 @@ string json_escape_utf8(const char* val, size_t val_size, bool escape_printable_
|
|||
{
|
||||
for ( unsigned int i = 0; i < char_size; i++ )
|
||||
escaped_result.append(json_escape_byte(val[idx+i]));
|
||||
utf_result.append(val, idx, char_size);
|
||||
utf_result.append(val+idx, char_size);
|
||||
idx += char_size;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue