Commit e26ad0d
Make it impossible to truncate or overflow the connection description
It's hard to predict the length of formatted output, so we'd better
notice (and abort) if the description is truncated. Incidentally,
mkdtemp() does this for us in the shared memory branch, but do an
explicit check there as well for consistency, and get rid of the wrongly
parametrized strncat() risking a buffer overflow (CONNECTION_DESCRIPTION
is not the length of the source "/qb").
Similar truncation checks should be added to qb_ipcs_{shm,us}_connect()
where they build the request/response names, and possibly to other
places using snprintf().1 parent 08806c5 commit e26ad0d
1 file changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| 631 | + | |
| 632 | + | |
631 | 633 | | |
632 | 634 | | |
633 | 635 | | |
| |||
654 | 656 | | |
655 | 657 | | |
656 | 658 | | |
657 | | - | |
658 | | - | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
659 | 669 | | |
660 | 670 | | |
661 | 671 | | |
| |||
668 | 678 | | |
669 | 679 | | |
670 | 680 | | |
671 | | - | |
| 681 | + | |
672 | 682 | | |
673 | | - | |
674 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
675 | 693 | | |
676 | 694 | | |
677 | 695 | | |
| |||
0 commit comments