mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-19 09:02:22 +02:00
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);
|
err = gpg_error (GPG_ERR_INV_SEXP);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (*p_elems == 'q')
|
if (*p_elems == 'q' && datalen)
|
||||||
{ /* Remove the prefix 0x40. */
|
{ /* Remove the prefix 0x40. */
|
||||||
data++;
|
data++;
|
||||||
datalen--;
|
datalen--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user