forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf145454
committed
Ensure _dosmaperr() actually sets errno correctly.
If logging is enabled, either ereport() or fprintf() might stomp on errnointernally, causing this function to return the wrong result. That mightonly end in a misleading error report, but in any code that's examiningerrno to decide what to do next, the consequences could be far graver.This has been broken since the very first version of this file in 2006... it's a bit astonishing that we didn't identify this long ago.Reported by Amit Kapila, though this isn't his proposed fix.1 parentb7212c9 commitf145454
1 file changed
+5
-3
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
182 |
| - | |
| 182 | + | |
| 183 | + | |
183 | 184 |
| |
184 | 185 |
| |
185 | 186 |
| |
186 |
| - | |
| 187 | + | |
187 | 188 |
| |
188 |
| - | |
| 189 | + | |
189 | 190 |
| |
| 191 | + | |
190 | 192 |
| |
191 | 193 |
| |
192 | 194 |
| |
|
0 commit comments
Comments
(0)