projects
/
users
/
c2main
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c98cd9b
)
If pk is NULL, the backend would segfault when accessing ->algo and the
author
Heikki Linnakangas
<
[email protected]
>
Wed, 20 Oct 2010 19:20:33 +0000
(22:20 +0300)
committer
Heikki Linnakangas
<
[email protected]
>
Wed, 20 Oct 2010 19:24:43 +0000
(22:24 +0300)
following NULL check was never reached.
This problem was found by Coccinelle (null_ref.cocci from coccicheck).
Marti Raudsepp
contrib/pgcrypto/pgp-pubenc.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pgcrypto/pgp-pubenc.c
b/contrib/pgcrypto/pgp-pubenc.c
index 0e9ebb42858999b3def97e31b04e0364033692d4..9b44fbfc692136d39b0302494eb534674a32d6b7 100644
(file)
--- a/
contrib/pgcrypto/pgp-pubenc.c
+++ b/
contrib/pgcrypto/pgp-pubenc.c
@@
-199,7
+199,7
@@
pgp_write_pubenc_sesskey(PGP_Context *ctx, PushFilter *dst)
PGP_PubKey *pk = ctx->pub_key;
uint8 ver = 3;
PushFilter *pkt = NULL;
- uint8 algo
= pk->algo
;
+ uint8 algo;
if (pk == NULL)
{
@@
-207,6
+207,8
@@
pgp_write_pubenc_sesskey(PGP_Context *ctx, PushFilter *dst)
return PXE_BUG;
}
+ algo = pk->algo;
+
/*
* now write packet
*/