summaryrefslogtreecommitdiffstats
path: root/tools/lib/rbtree.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2023-03-16 21:41:56 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-04-04 09:39:56 -0300
commitf5ceb159d30b87975a49b8a230ffa76bae6684b2 (patch)
tree799e9a43e84d5a9e583bd4ad68103c07ae2903ac /tools/lib/rbtree.c
parenta2410b579c72242ac0f77b3768093d8c1b48012e (diff)
downloadlinux-stable-f5ceb159d30b87975a49b8a230ffa76bae6684b2.tar.gz
linux-stable-f5ceb159d30b87975a49b8a230ffa76bae6684b2.tar.bz2
linux-stable-f5ceb159d30b87975a49b8a230ffa76bae6684b2.zip
perf tools: Avoid warning in do_realloc_array_as_needed()
do_realloc_array_as_needed() used memcpy() of zero size with a NULL pointer. Check the size first to avoid sanitize warning. Discovered using EXTRA_CFLAGS="-fsanitize=undefined -fsanitize=address". Reported-by: kernel test robot <yujie.liu@intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/oe-lkp/202303061424.6ad43294-yujie.liu@intel.com Link: https://lore.kernel.org/r/20230316194156.8320-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/rbtree.c')
0 files changed, 0 insertions, 0 deletions