From 9c81c67e2abbaff01fd6ed6266c8ec33f143fbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sun, 8 Dec 2024 14:02:29 +0100 Subject: [PATCH] m_property: stop processing after 10 properties even in skip cases For OSS-Fuzz. See: 2054d872d48f315d4658f0871d914061a35eda2a --- options/m_property.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/options/m_property.c b/options/m_property.c index 94e2d18a3b..e35dbffe2d 100644 --- a/options/m_property.c +++ b/options/m_property.c @@ -313,11 +313,12 @@ char *m_properties_expand_string(const struct m_property *prop_list, str = bstr_cut(str, term_pos); bool have_fallback = bstr_eatstart0(&str, ":"); - if (!skip) { #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION - if (n++ > 10) - break; + if (n++ > 10) + break; #endif + + if (!skip) { skip = expand_property(prop_list, &ret, &ret_len, name, have_fallback, ctx); if (skip)