Overview
Request 870788 accepted
- update to 0.99.9:
- add API fjson_object_get_uint()
- add API fjson_object_array_del_idx()
- bugfix for dangling pointer that causes segfault
The other functions assume that the memory is either set to NULL or a valid
json object. The array_list_del_idx function only moves the elements, but
does not set the pointer to null, which causes the same pointer to remain
in the list (outside of arr->length). Then, when array_list_put_idx is
called, the array_list_expand_internal leaps out, meaning that it has not
set the indices outside of the requested length to 0. array_list_put_idx
finds the pointer, tries to free it and a double free will be incurred,
because the actual element is still in the list.
- Created by dirkmueller
- In state accepted
Request History
dirkmueller created request
- update to 0.99.9:
- add API fjson_object_get_uint()
- add API fjson_object_array_del_idx()
- bugfix for dangling pointer that causes segfault
The other functions assume that the memory is either set to NULL or a valid
json object. The array_list_del_idx function only moves the elements, but
does not set the pointer to null, which causes the same pointer to remain
in the list (outside of arr->length). Then, when array_list_put_idx is
called, the array_list_expand_internal leaps out, meaning that it has not
set the indices outside of the requested length to 0. array_list_put_idx
finds the pointer, tries to free it and a double free will be incurred,
because the actual element is still in the list.
factory-auto added opensuse-review-team as a reviewer
Please review sources
factory-auto accepted review
Check script succeeded
licensedigger accepted review
ok
dimstar accepted review
dimstar_suse set openSUSE:Factory:Staging:N as a staging project
Being evaluated by staging project "openSUSE:Factory:Staging:N"
dimstar_suse accepted review
Picked "openSUSE:Factory:Staging:N"
dimstar_suse accepted review
Staging Project openSUSE:Factory:Staging:N got accepted.
dimstar_suse approved review
Staging Project openSUSE:Factory:Staging:N got accepted.
dimstar_suse accepted request
Staging Project openSUSE:Factory:Staging:N got accepted.