Fix: truncation of text array and sequences by NULL terminator
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 25 Mar 2021 18:47:47 +0000 (14:47 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Mar 2021 12:54:20 +0000 (08:54 -0400)
commit879f9b0aa0c9a8ee31ba47bfaaf6539ef2e349b2
tree39a2d2b91e57b64c94698a825c43a6953995ce2c
parentb4c8bf2f2320b7a2d19dec6addda5d6d2aa227a3
Fix: truncation of text array and sequences by NULL terminator

The recent refactor does not take into account that text array and text
sequence types behave like Pascal Strings and not C strings, which means
the NULL terminator is optional, and the string size is delimited by the
array or sequence length.

Introduce a new lib_ring_buffer_pstrcpy() to handle copying into a ring
buffer Pascal String, and use it for array and sequence of text.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fixes: 2792781482a5 ("ABI refactoring: sequence and array of text: copy input as string")
Fixes: #1301
Change-Id: Idcc13f061d5229496476f42dce84c2f395b7f6e6
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
liblttng-ust/lttng-ring-buffer-client.h
libringbuffer/backend.h
This page took 0.0247 seconds and 4 git commands to generate.