From f66e55564ea9ac067559c5fccd70026f9caeaed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 1 Nov 2021 22:16:50 +0100 Subject: [PATCH] core: check that name is not NULL in function hdata_get_var --- src/core/wee-hdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/wee-hdata.c b/src/core/wee-hdata.c index e4f8bebd3..4e4322f20 100644 --- a/src/core/wee-hdata.c +++ b/src/core/wee-hdata.c @@ -392,7 +392,7 @@ hdata_get_var (struct t_hdata *hdata, void *pointer, const char *name) { int offset; - if (!hdata || !pointer) + if (!hdata || !pointer || !name) return NULL; offset = hdata_get_var_offset (hdata, name);