Commit 2306077
fix: guard .error() calls on std::expected to avoid UB in prepared_statement tests
Calling .error() on a std::expected that holds a value is undefined behavior.
The uninitialized string caused std::bad_alloc when operator+ read garbage size.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a82d0d0 commit 2306077
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1656 | 1656 | | |
1657 | 1657 | | |
1658 | 1658 | | |
1659 | | - | |
| 1659 | + | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
1663 | | - | |
| 1663 | + | |
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
| |||
1698 | 1698 | | |
1699 | 1699 | | |
1700 | 1700 | | |
1701 | | - | |
| 1701 | + | |
1702 | 1702 | | |
1703 | 1703 | | |
1704 | 1704 | | |
| |||
0 commit comments