]> git.ipfire.org Git - thirdparty/hostap.git/commit
trace: Use strncmp() to match function names
authorBenjamin Berg <benjamin.berg@intel.com>
Fri, 14 Jun 2024 08:13:49 +0000 (10:13 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 11 Jul 2024 16:52:34 +0000 (19:52 +0300)
commit49344db0954e463f54cfbd05b7898575b2c8c734
tree3567c6b0195d3e22fc093677521b03280eb630c6
parent918da644e17c24ca70cd192c6d1c5df566104090
trace: Use strncmp() to match function names

The functions specified by the user might be longer than the function in
the backtrace, potentially overflowing the memcmp(). In practice, it
should not be a relevant out-of-memory read. However, we can use
strncmp() instead.

Note that, as before, this is only a prefix match. If a function name is
longer in the backtrace it will still match.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
src/utils/os_unix.c