Commit a45cb45
committed
When unmarshalling, add test for negative lengths on strings, tuples
and lists; if the size is negative, raise an exception. Also raise an
exception when an undefined type is found -- all this to increase the
chance that garbage input causes an exception instead of a core dump.1 parent a63eff6 commit a45cb45
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
466 | 470 | | |
467 | 471 | | |
468 | 472 | | |
| |||
476 | 480 | | |
477 | 481 | | |
478 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
479 | 487 | | |
480 | 488 | | |
481 | 489 | | |
| |||
492 | 500 | | |
493 | 501 | | |
494 | 502 | | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
495 | 507 | | |
496 | 508 | | |
497 | 509 | | |
| |||
571 | 583 | | |
572 | 584 | | |
573 | 585 | | |
574 | | - | |
575 | | - | |
| 586 | + | |
| 587 | + | |
576 | 588 | | |
577 | 589 | | |
578 | 590 | | |
| |||
0 commit comments