forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0eb2328
committed
Fix two memcpy() bugs in the new injection point code
1. The memcpy()s in InjectionPointAttach() would copy garbage frombeyond the end of input string to the buffer in shared memory. Youwon't usually notice, but if there is not enough valid mapped memorybeyond the end of the string, the read of unmapped memory willsegfault. This was flagged by the Cirrus CI build with addresssanitizer enabled.2. The memcpy() in injection_point_cache_add() failed to copy the NULLterminator.Discussion:https://www.postgresql.org/message-id/0615a424-b726-4157-afa7-4245629f9512%40iki.fi1 parent49f7c6c commit0eb2328
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
| 100 | + | |
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
220 |
| - | |
| 220 | + | |
221 | 221 |
| |
222 |
| - | |
| 222 | + | |
223 | 223 |
| |
224 |
| - | |
| 224 | + | |
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
|
0 commit comments
Comments
(0)