Repository navigation
Commit f7e7c6b
committed
MDEV-41156: ASAN use-after-poison in JSON_CONTAINS_PATH
The json_depth_array as allocated for 32 elements but accessed
it as though there wasn't a limit.
Called mem_root_dynamic_array_resize_and_get_val to ensure that
the number of elements was presented, and error JE_EOS (out of
space) if allocation exceeded and return its pointer.
With the array resizing called early mem_root_dynamic_array_resize_and_set_val
isn't required.
Removed unused 'value' variable, as value_ptr was always valid.
Reported by: David Korczynski of Ada Logics1 parent f59e460 commit f7e7c6b
3 files changed
Lines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6217 | 6217 | | |
6218 | 6218 | | |
6219 | 6219 | | |
| 6220 | + | |
| 6221 | + | |
| 6222 | + | |
| 6223 | + | |
| 6224 | + | |
| 6225 | + | |
6220 | 6226 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4766 | 4766 | | |
4767 | 4767 | | |
4768 | 4768 | | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
4769 | 4775 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2082 | 2082 | | |
2083 | 2083 | | |
2084 | 2084 | | |
2085 | | - | |
| 2085 | + | |
2086 | 2086 | | |
2087 | | - | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
2088 | 2095 | | |
2089 | | - | |
2090 | | - | |
2091 | | - | |
2092 | | - | |
2093 | | - | |
| 2096 | + | |
2094 | 2097 | | |
2095 | 2098 | | |
2096 | 2099 | | |
| |||
0 commit comments