From 3b7161679ca465a04efca3ca962685926c3a2a1a Mon Sep 17 00:00:00 2001 From: David Korczynski Date: Tue, 15 Apr 2025 03:44:47 -0700 Subject: [PATCH] config_format: fix SEGV from missing return check Fixes: https://issues.oss-fuzz.com/issues/42530021 Signed-off-by: David Korczynski --- src/config_format/flb_config_format.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config_format/flb_config_format.c b/src/config_format/flb_config_format.c index 92f92add099..28486d6a257 100644 --- a/src/config_format/flb_config_format.c +++ b/src/config_format/flb_config_format.c @@ -71,6 +71,9 @@ flb_sds_t flb_cf_key_translate(struct flb_cf *cf, char *key, int len) /* copy content and check if we have underscores */ out = flb_sds_create_size(len * 2); + if (out == NULL) { + return NULL; + } flb_sds_cat_safe(&out, key, len); for (i = 0; i < len; i++) {