m_property: stop processing after 10 properties even in skip cases

For OSS-Fuzz.

See: 2054d872d4
This commit is contained in:
Kacper Michajłow committed 2024-12-12 01:45:19 +01:00
1 parent d33e54250e
commit 9c81c67e2a
1 file changed
+4 -3
+4 -3
View File
@@ -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)