diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-03-19 17:33:46 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-03-19 17:39:45 +0100 |
commit | 4a5b9010ccc56fdf288fe758023af445feb93fad (patch) | |
tree | 030788347c69efc2aff5a7b4c06d9f7d889e4b82 /tests/00_syntax/01_unterminated_comment | |
parent | 647c6a7927c5c6ef2941ba1dc3c1d40c2c7d7f34 (diff) |
value: fix accessing array indexes with non-numeric values
Since libjson-c's json_object_get_int64() returns 0 for any input value
that has no integer representation, any kind of invalid array index
incorrectly yielded the first array element.
Fix this issue by explicitly converting string values and by rejecting
any other kind of value.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/00_syntax/01_unterminated_comment')
0 files changed, 0 insertions, 0 deletions