mirror of git://git.gnupg.org/gnupg.git
agent: Protect commit 135b1e3
against misbehaving Libgcrypt.
* agent/command-ssh.c (ssh_key_to_blob): Check DATALEN. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
f9c83d84e7
commit
9ba4ccdaf5
|
@ -1964,7 +1964,7 @@ ssh_key_to_blob (gcry_sexp_t sexp, int with_secret,
|
|||
err = gpg_error (GPG_ERR_INV_SEXP);
|
||||
goto out;
|
||||
}
|
||||
if (*p_elems == 'q')
|
||||
if (*p_elems == 'q' && datalen)
|
||||
{ /* Remove the prefix 0x40. */
|
||||
data++;
|
||||
datalen--;
|
||||
|
|
Loading…
Reference in New Issue