From: Simon Marchi Date: Fri, 29 Nov 2019 21:42:24 +0000 (-0500) Subject: buffer-view: introduce lttng_buffer_view_contains_string X-Git-Tag: v2.13.0-rc1~665 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=67d8e2ef48ea2cd334bf9efd90b58b976437a3cd;hp=67d8e2ef48ea2cd334bf9efd90b58b976437a3cd;p=lttng-tools.git buffer-view: introduce lttng_buffer_view_contains_string 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 Signed-off-by: Jérémie Galarneau ---