Repository navigation
Commit 1dd1c3d
committed
fix invalid JSON when OSADL lookup matches structural key
osadl_print_license() extracted the object between the first '{' and
first '}' after a matched key, assuming a flat license entry. When a
license token collided with a structural key (e.g. the top-level
"licenses" key whose value holds nested objects), the first '}' closed
an inner object, emitting an unbalanced '{' and breaking the JSON output.
Guard against a missing '{' and reject matches whose object contains a
nested '{', so only flat per-license entries are emitted.1 parent 0e1913e commit 1dd1c3d
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
249 | 251 | | |
250 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
251 | 259 | | |
252 | 260 | | |
253 | 261 | | |
| |||
0 commit comments