forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfb30c9c
committed
In pg_log_generic(), be more paranoid about preserving errno.
This code failed to account for the possibility that malloc() wouldchange errno, resulting in wrong output for %m, not to mention thepossibility of message truncation. Such a change is obviouslyexpected when malloc fails, but there's reason to fear that on someplatforms even a successful malloc call can modify errno.Discussion:https://postgr.es/m/2576.1527382833@sss.pgh.pa.us1 parentb33283c commitfb30c9c
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
| 219 | + | |
| 220 | + | |
219 | 221 |
| |
220 | 222 |
| |
221 | 223 |
| |
|
0 commit comments
Comments
(0)