Commit 2db3fd1
committed
AVRO-4298: [php] Reject negative block size on negative array/map blocks
Addresses review feedback: when decoding a negative array or map block count,
the subsequent block-size long was read and ignored without validation. Avro
binary encoding specifies block size as a byte count, so a negative value is
malformed. Reject it early to match skipArray/skipMap and prevent malformed
input from proceeding further than necessary.
Assisted-by: GitHub Copilot:claude-opus-4.81 parent 542afad commit 2db3fd1
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
353 | 356 | | |
354 | 357 | | |
355 | 358 | | |
356 | | - | |
357 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
358 | 363 | | |
359 | 364 | | |
360 | 365 | | |
| |||
0 commit comments