Repository navigation
Commit fad2a51
committed
fix(search): treat metadata encoding failure as an error in tree output
json_result() owns and disposes the serialized metadata that ranked_tree()
and the tree branch of cbm_search_operation_execute() turn into tree text.
When allocation or encoding fails, it returns an error payload with
is_error=true. Both callers checked only the payload, so they could render
that error text as metadata and never take their encoding-failure path.
Both callers now require !is_error && payload before calling
cbm_json_to_tree(). Disposal and the existing failure paths are unchanged.
The integration worker found this while merging fu/toon-output and
fu/argparse-memcore, and proposed the fix.1 parent fdc8e28 commit fad2a51
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| |||
1097 | 1099 | | |
1098 | 1100 | | |
1099 | 1101 | | |
1100 | | - | |
1101 | | - | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1102 | 1105 | | |
1103 | 1106 | | |
1104 | 1107 | | |
| |||
0 commit comments