Merge branch 'jk/list-objects-filter-cleanup'
Fix uninitialized memory access in a recent fix-up that is already in -rc1. * jk/list-objects-filter-cleanup: list-objects-filter: initialize sub-filter structsmaint
commit
4b79ee4b0c
|
@ -143,6 +143,7 @@ static int parse_combine_subfilter(
|
||||||
|
|
||||||
ALLOC_GROW_BY(filter_options->sub, filter_options->sub_nr, 1,
|
ALLOC_GROW_BY(filter_options->sub, filter_options->sub_nr, 1,
|
||||||
filter_options->sub_alloc);
|
filter_options->sub_alloc);
|
||||||
|
list_objects_filter_init(&filter_options->sub[new_index]);
|
||||||
|
|
||||||
decoded = url_percent_decode(subspec->buf);
|
decoded = url_percent_decode(subspec->buf);
|
||||||
|
|
||||||
|
@ -263,6 +264,8 @@ void parse_list_objects_filter(
|
||||||
parse_error = gently_parse_list_objects_filter(
|
parse_error = gently_parse_list_objects_filter(
|
||||||
filter_options, arg, &errbuf);
|
filter_options, arg, &errbuf);
|
||||||
} else {
|
} else {
|
||||||
|
struct list_objects_filter_options *sub;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make filter_options an LOFC_COMBINE spec so we can trivially
|
* Make filter_options an LOFC_COMBINE spec so we can trivially
|
||||||
* add subspecs to it.
|
* add subspecs to it.
|
||||||
|
@ -273,9 +276,10 @@ void parse_list_objects_filter(
|
||||||
filter_spec_append_urlencode(filter_options, arg);
|
filter_spec_append_urlencode(filter_options, arg);
|
||||||
ALLOC_GROW_BY(filter_options->sub, filter_options->sub_nr, 1,
|
ALLOC_GROW_BY(filter_options->sub, filter_options->sub_nr, 1,
|
||||||
filter_options->sub_alloc);
|
filter_options->sub_alloc);
|
||||||
|
sub = &filter_options->sub[filter_options->sub_nr - 1];
|
||||||
|
|
||||||
parse_error = gently_parse_list_objects_filter(
|
list_objects_filter_init(sub);
|
||||||
&filter_options->sub[filter_options->sub_nr - 1], arg,
|
parse_error = gently_parse_list_objects_filter(sub, arg,
|
||||||
&errbuf);
|
&errbuf);
|
||||||
}
|
}
|
||||||
if (parse_error)
|
if (parse_error)
|
||||||
|
|
Loading…
Reference in New Issue