Project

General

Profile

Actions

Optimization #8503

open
SP

utli/ja3: make Ja3BufferAppendBuffer "consistent"

Optimization #8503: utli/ja3: make Ja3BufferAppendBuffer "consistent"

Added by Sergey Pinaev 1 day ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Effort:
Difficulty:
Label:

Description

the description of Ja3BufferAppendBuffer() say "Append the second buffer to the first and then free it".
in all conditions after freeing second buffer, pointer to freed data replaced with NULL to avoid
further freeing. but if buffer1 contains no data - buffer2 is freed, but pointer left intact
and possibly there can be second call of free() on it.
right now it is seems impossible, as i cannot find a way, where Ja3BufferAppendBuffer() can
be called with (*buffer1)->data == NULL.
but it is better to append *buffer2 = NULL; after SCFree(*buffer2);
or just remove if ((*buffer1)->data == NULL) ... part

Actions

Also available in: PDF Atom