buffer-view: introduce lttng_buffer_view_contains_string
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 29 Nov 2019 21:42:24 +0000 (16:42 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Apr 2020 20:32:19 +0000 (16:32 -0400)
This function can be used to safely validate that a string in a buffer
view has the length we expect.  The goal is to avoid doing any reads
outside the buffer view, whatever the input is, considering that the
buffer and advertised length of the string are untrusted data.

It will be used by subsequent patches to deserialize strings from
received buffers.

Change-Id: I8afc4b6f9334e035e0ef02cb96b157df59d8107d
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.025502 seconds and 4 git commands to generate.