Skip to content

Commit f4ae354

Browse files
DavidKorczynskiedsiper
authored andcommitted
config_format: fix SEGV from missing return check
Fixes: https://issues.oss-fuzz.com/issues/42530021 Signed-off-by: David Korczynski <[email protected]>
1 parent 46ba2aa commit f4ae354

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/config_format/flb_config_format.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ flb_sds_t flb_cf_key_translate(struct flb_cf *cf, char *key, int len)
7171

7272
/* copy content and check if we have underscores */
7373
out = flb_sds_create_size(len * 2);
74+
if (out == NULL) {
75+
return NULL;
76+
}
7477
flb_sds_cat_safe(&out, key, len);
7578

7679
for (i = 0; i < len; i++) {

0 commit comments

Comments
 (0)