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

Commit22e1943

Browse files
committed
pgcrypto: Check for error return of px_cipher_decrypt()
This has previously not been a problem (that anyone ever reported),but in future OpenSSL versions (3.0.0), where legacy ciphers are/canbe disabled, this is the place where this is reported. So we need tocatch the error here, otherwise the higher-level functions wouldreturn garbage. The nearby encryption code already handled errorssimilarly.Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Discussion:https://www.postgresql.org/message-id/9e9c431c-0adc-7a6d-9b1a-915de1ba3fe7@enterprisedb.com
1 parenta6715af commit22e1943

File tree

1 file changed

+4
-1
lines changed
  • contrib/pgcrypto

1 file changed

+4
-1
lines changed

‎contrib/pgcrypto/px.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ static int
292292
combo_decrypt(PX_Combo*cx,constuint8*data,unsigneddlen,
293293
uint8*res,unsigned*rlen)
294294
{
295+
interr=0;
295296
unsignedbs,
296297
i,
297298
pad;
@@ -317,7 +318,9 @@ combo_decrypt(PX_Combo *cx, const uint8 *data, unsigned dlen,
317318

318319
/* decrypt */
319320
*rlen=dlen;
320-
px_cipher_decrypt(c,data,dlen,res);
321+
err=px_cipher_decrypt(c,data,dlen,res);
322+
if (err)
323+
returnerr;
321324

322325
/* unpad */
323326
if (bs>1&&cx->padding)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp