- Notifications
You must be signed in to change notification settings - Fork28
Commitb01f32c
committed
Fix some dubious WAL-parsing code.
Coverity complained about possible buffer overrun in two places added bycommit1eb6d65, and AFAICS it's reasonable to worry: even granting thatthe WAL originator properly truncated the commit GID to GIDSIZE, we shouldnot really bet our lives on that having the same value as it does in thecurrent build. Hence, use strlcpy() not strcpy(), and adjust the pointeradvancement logic to be sure we skip over the whole source string even ifstrlcpy() truncated it.1 parent05e85d3 commitb01f32c
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 |
| - | |
110 |
| - | |
| 109 | + | |
| 110 | + | |
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 |
| - | |
194 |
| - | |
| 193 | + | |
| 194 | + | |
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
|
0 commit comments
Comments
(0)