Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18e752f

Browse files
committed
If pk is NULL, the backend would segfault when accessing ->algo and the
following NULL check was never reached.This problem was found by Coccinelle (null_ref.cocci from coccicheck).Marti Raudsepp
1 parentdef30e8 commit18e752f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎contrib/pgcrypto/pgp-pubenc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,16 @@ pgp_write_pubenc_sesskey(PGP_Context *ctx, PushFilter *dst)
199199
PGP_PubKey*pk=ctx->pub_key;
200200
uint8ver=3;
201201
PushFilter*pkt=NULL;
202-
uint8algo=pk->algo;
202+
uint8algo;
203203

204204
if (pk==NULL)
205205
{
206206
px_debug("no pubkey?\n");
207207
returnPXE_BUG;
208208
}
209209

210+
algo=pk->algo;
211+
210212
/*
211213
* now write packet
212214
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp