mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-24 03:13:06 -04:00
BUILD: tools: potential null pointer dereference in dl_collect_libs_cb
This patch fixes a warning that can be reproduced with gcc-8.5 on RHEL8 (gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28)). This should fix issue #3303. Must be backported everywhere 917e82f283 ("MINOR: debug: copy debug symbols from /usr/lib/debug when present") was backported, which is to branch 3.2 for now.
This commit is contained in:
parent
8e250bba8f
commit
33041fe91f
1 changed files with 3 additions and 0 deletions
|
|
@ -6057,6 +6057,9 @@ static int dl_collect_libs_cb(struct dl_phdr_info *info, size_t size, void *data
|
|||
/* else it's a VDSO or similar and we're not interested */
|
||||
goto leave;
|
||||
|
||||
if (!fname)
|
||||
goto leave;
|
||||
|
||||
load_file_into_tar(&ctx->storage, &ctx->size, ctx->prefix, fname, NULL, "haproxy-libs-dump");
|
||||
|
||||
/* try to load equivalent debug symbols for absolute paths */
|
||||
|
|
|
|||
Loading…
Reference in a new issue