forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7abc157
committed
Avoid possibly-unsafe use of Windows' FormatMessage() function.
Whenever this function is used with the FORMAT_MESSAGE_FROM_SYSTEM flag,it's good practice to include FORMAT_MESSAGE_IGNORE_INSERTS as well.Otherwise, if the message contains any %n insertion markers, the functionwill try to fetch argument strings to substitute --- which we are notpassing, possibly leading to a crash. This is exactly analogous to therule about not giving printf() a format string you're not in control of.Noted and patched by Christian Ullrich.Back-patch to all supported branches.1 parent61d66c4 commit7abc157
4 files changed
+15
-5
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1011 | 1011 |
| |
1012 | 1012 |
| |
1013 | 1013 |
| |
1014 |
| - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
1015 | 1017 |
| |
1016 | 1018 |
| |
1017 | 1019 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
658 | 658 |
| |
659 | 659 |
| |
660 | 660 |
| |
661 |
| - | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
662 | 664 |
| |
663 | 665 |
| |
664 | 666 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
234 | 234 |
| |
235 | 235 |
| |
236 | 236 |
| |
237 |
| - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
238 | 240 |
| |
239 | 241 |
| |
240 | 242 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
209 |
| - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
210 | 212 |
| |
211 | 213 |
| |
212 | 214 |
| |
| |||
281 | 283 |
| |
282 | 284 |
| |
283 | 285 |
| |
284 |
| - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
285 | 289 |
| |
286 | 290 |
| |
287 | 291 |
| |
|
0 commit comments
Comments
(0)