forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4372adf
committed
Fix possible NULL pointer dereference in GetNamedDSMSegment().
GetNamedDSMSegment() doesn't check whether dsm_attach() returnsNULL, which creates the possibility of a NULL pointer dereferencesoon after. To fix, emit an ERROR if dsm_attach() returns NULL.This shouldn't happen, but it would be nice to avoid a segfault ifit does. In passing, tidy up the surrounding code.Reported-by: Tom LaneReviewed-by: Michael Paquier, Bharath RupireddyDiscussion:https://postgr.es/m/3348869.1705854106%40sss.pgh.pa.us1 parentcdd8634 commit4372adf
1 file changed
+12
-9
lines changedLines changed: 12 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
| 180 | + | |
181 | 181 |
| |
182 |
| - | |
183 |
| - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
184 | 193 |
| |
185 |
| - | |
186 | 194 |
| |
187 | 195 |
| |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 | 196 |
| |
194 | 197 |
| |
195 | 198 |
| |
|
0 commit comments
Comments
(0)