History

m_property: stop processing after 10 properties even in skip cases

For OSS-Fuzz.

Kacper Michajłow committed 1 year ago

Commit 9c81c671 parent d33e5421 file · +4 −3Browse files

Unified · Split

options/m_property.c+4−3
@@ -313,11 +313,12 @@ char *m_properties_expand_string(const struct m_property *prop_list, · 312 unmodified lines
313 str = bstr_cut(str, term_pos);313 str = bstr_cut(str, term_pos);
314 bool have_fallback = bstr_eatstart0(&str, ":");314 bool have_fallback = bstr_eatstart0(&str, ":");
315 315
316 if (!skip) {
317#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION316#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
318 if (n++ > 10)317 if (n++ > 10)
319 break;318 break;
320#endif319#endif
320
321 if (!skip) {
321 skip = expand_property(prop_list, &ret, &ret_len, name,322 skip = expand_property(prop_list, &ret, &ret_len, name,
322 have_fallback, ctx);323 have_fallback, ctx);
323 if (skip)324 if (skip)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t