diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-09-26 08:15:40 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-09-26 08:15:40 +0000 |
commit | c264185490184895dd8c3a3a2e35da759f83e2b1 (patch) | |
tree | 6b1470a19a365a33eed09147e0fd189e057fa7be /libextra | |
parent | 7932a89d1ecd2a7db77acbc58994ba572b3dea59 (diff) | |
download | gnutls-c264185490184895dd8c3a3a2e35da759f83e2b1.tar.gz |
(kbx_data_to_keyring): Fix off-by-one error in call to malloc,
reported by "Adam Langley" <agl@imperialviolet.org>.
Diffstat (limited to 'libextra')
-rw-r--r-- | libextra/gnutls_openpgp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index 9a0c63d8c4..1775ca14bd 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation + * Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation * * Author: Timo Schulz <twoaday@freakmail.de> * @@ -222,7 +222,7 @@ kbx_data_to_keyring (int type, int enc, const char *data, if (!data) return NULL; - p = gnutls_malloc (1 + 4 + size); + p = gnutls_malloc (1 + 1 + 4 + size); if (!p) return NULL; p[0] = type; /* type: {keyring,name} */ |