forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7f42350
committed
Avoid null pointer dereference if error result lacks SQLSTATE.
Although error results received from the backend should always havea SQLSTATE field, ones generated by libpq won't, making this codevulnerable to a crash after, say, untimely loss of connection.Noted by Coverity.Oversight in commit403a3d9. Back-patch to 9.5, as that was.1 parentb17ff07 commit7f42350
1 file changed
+8
-6
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
540 | 540 |
| |
541 | 541 |
| |
542 | 542 |
| |
543 |
| - | |
544 |
| - | |
545 |
| - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
546 | 546 |
| |
547 | 547 |
| |
548 | 548 |
| |
| |||
569 | 569 |
| |
570 | 570 |
| |
571 | 571 |
| |
572 |
| - | |
| 572 | + | |
| 573 | + | |
573 | 574 |
| |
574 | 575 |
| |
575 | 576 |
| |
576 | 577 |
| |
577 |
| - | |
578 |
| - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
579 | 581 |
| |
580 | 582 |
| |
581 | 583 |
| |
|
0 commit comments
Comments
(0)