You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.
The function tries to match decoded JSON objects to the given keys received as arguments and store the corresponding objects back into the out parameters.
The bug stems from the fact that walking the list of va arguments is synchronised with the iteration over the members of the decoded object, not the keys. Since the order of the members into a JSON object can vary, the allocation to the output references can be wrong.
Also, the usage of va_arg in the function receives the wrong type paramter: UJObject instead of UJObject *, though this has little consequence, since both are pointers.
- fix a bug in UJObjectUnpack() function with assignment of output
parameters ( esnme/ujson4c#10 )
- fix a bug in UUJDecod() function with un-checked mem allocation
( esnme/ujson4c#9 )
bpintea
added a commit
to elastic/elasticsearch-sql-odbc
that referenced
this issue
Jun 4, 2018
- fix a bug in UJObjectUnpack() function with assignment of output
parameters ( esnme/ujson4c#10 )
- fix a bug in UUJDecod() function with un-checked mem allocation
( esnme/ujson4c#9 )
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The function tries to match decoded JSON objects to the given keys received as arguments and store the corresponding objects back into the out parameters.
The bug stems from the fact that walking the list of va arguments is synchronised with the iteration over the members of the decoded object, not the keys. Since the order of the members into a JSON object can vary, the allocation to the output references can be wrong.
Also, the usage of
va_arg
in the function receives the wrong type paramter:UJObject
instead ofUJObject *
, though this has little consequence, since both are pointers.This is likely the cause of #7.
Below is a proposed patch to fix the issue (as well the local mixing of tabs and WSes).
The text was updated successfully, but these errors were encountered: