Commit 8ac0365
committed
Avoid improbable null pointer dereference in pgpassfileWarning().
Coverity complained that we might pass a null pointer to strcmp()
if PQresultErrorField were to return NULL. That shouldn't be possible,
since the server is supposed to always provide some SQLSTATE or other
in an error message. But we usually defend against such hazards, and
it only takes a little more code to do so here.
There's no good reason to think this is a live bug, so no back-patch.1 parent 555494d commit 8ac0365
1 file changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6312 | 6312 | | |
6313 | 6313 | | |
6314 | 6314 | | |
6315 | | - | |
6316 | | - | |
6317 | | - | |
| 6315 | + | |
| 6316 | + | |
6318 | 6317 | | |
6319 | 6318 | | |
6320 | 6319 | | |
6321 | 6320 | | |
6322 | 6321 | | |
6323 | 6322 | | |
6324 | | - | |
6325 | | - | |
6326 | | - | |
| 6323 | + | |
6327 | 6324 | | |
6328 | | - | |
| 6325 | + | |
| 6326 | + | |
| 6327 | + | |
| 6328 | + | |
| 6329 | + | |
6329 | 6330 | | |
6330 | | - | |
| 6331 | + | |
6331 | 6332 | | |
6332 | 6333 | | |
6333 | 6334 | | |
| |||
0 commit comments