mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: Change a bug() call to a regular error message.
* g10/decrypt-data.c (decrypt_data): Return an error code instead of calling BUG(). -- This code path can be triggered by fuzzing gpg and thus with some likeness also by corrupt messages for other reasons.
This commit is contained in:
parent
8445ef24fc
commit
1c2140346d
@ -130,7 +130,12 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
|
||||
log_fatal ("unsupported blocksize %u\n", blocksize );
|
||||
nprefix = blocksize;
|
||||
if ( ed->len && ed->len < (nprefix+2) )
|
||||
BUG();
|
||||
{
|
||||
/* An invalid message. We can't check that during parsing
|
||||
because we may not know the used cipher then. */
|
||||
rc = gpg_error (GPG_ERR_INV_PACKET);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
if ( ed->mdc_method )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user