fix: 1 byte overflow in UuidView
The string() method of UuidView allocates a buffer of BT_UUID_STR_LEN
bytes and then calls bt_uuid_to_str() that prints a C string of
BT_UUID_STR_LEN + 1 bytes (including the terminating null byte ('\0'))
which results in a 1 byte overflow.
Directly use an std::string instead of a char array, resize it to
BT_UUID_STR_LEN which implicitly adds the terminating null byte and then
use the data method to write to the underlying C string.
Change-Id: Ifa6f0322c219e28dec78b8680763b3126a1e513a
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/9594
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.02499 seconds and 4 git commands to generate.