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.

Loading...
Request History
Dirk Mueller's avatar

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's avatar

factory-auto added opensuse-review-team as a reviewer

Please review sources


Factory Auto's avatar

factory-auto accepted review

Check script succeeded


Saul Goodman's avatar

licensedigger accepted review

ok


Dominique Leuenberger's avatar

dimstar accepted review


Dominique Leuenberger's avatar

dimstar_suse set openSUSE:Factory:Staging:N as a staging project

Being evaluated by staging project "openSUSE:Factory:Staging:N"


Dominique Leuenberger's avatar

dimstar_suse accepted review

Picked "openSUSE:Factory:Staging:N"


Dominique Leuenberger's avatar

dimstar_suse accepted review

Staging Project openSUSE:Factory:Staging:N got accepted.


Dominique Leuenberger's avatar

dimstar_suse approved review

Staging Project openSUSE:Factory:Staging:N got accepted.


Dominique Leuenberger's avatar

dimstar_suse accepted request

Staging Project openSUSE:Factory:Staging:N got accepted.

openSUSE Build Service is sponsored by