diff options
author | Werner Koch <[email protected]> | 2015-09-01 05:39:28 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-09-01 05:39:28 +0000 |
commit | 9ba4ccdaf5e128fbea51ff142c63d4b359c7264d (patch) | |
tree | 027d3813f57e241a779b9235b0eab4229f967e96 /agent/command-ssh.c | |
parent | gpg: Remove option --no-sig-create-check. (diff) | |
download | gnupg-9ba4ccdaf5e128fbea51ff142c63d4b359c7264d.tar.gz gnupg-9ba4ccdaf5e128fbea51ff142c63d4b359c7264d.zip |
agent: Protect commit 135b1e3 against misbehaving Libgcrypt.
* agent/command-ssh.c (ssh_key_to_blob): Check DATALEN.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | agent/command-ssh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 689241f67..88686200a 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -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--; |