Repository navigation
Commit 04a67f8
committed
fix(cypher): build the DISTINCT row key without snprintf-derived sizes
CodeQL cpp/overflowing-snprintf (alert 85) flagged rb_row_key: it advanced `used` by snprintf's return value and passed `cap - used` as the next size, which would underflow if a call ever truncated. The buffer is sized for every column first, so it never did; the key is now copied with explicit bounds instead. The key bytes are unchanged, so DISTINCT results are identical.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent c9cacdf commit 04a67f8
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4016 | 4016 | | |
4017 | 4017 | | |
4018 | 4018 | | |
4019 | | - | |
4020 | 4019 | | |
4021 | | - | |
4022 | | - | |
| 4020 | + | |
| 4021 | + | |
| 4022 | + | |
| 4023 | + | |
| 4024 | + | |
| 4025 | + | |
| 4026 | + | |
| 4027 | + | |
| 4028 | + | |
| 4029 | + | |
| 4030 | + | |
| 4031 | + | |
| 4032 | + | |
4023 | 4033 | | |
4024 | 4034 | | |
4025 | 4035 | | |
| |||
0 commit comments