diff options
author | Simon Josefsson <simon@josefsson.org> | 2007-06-14 09:12:24 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2007-06-14 09:12:24 +0200 |
commit | a3f0b548ac93fef4ba5e29212a0ee269a73c64b1 (patch) | |
tree | e41900bd7bee0c015f5809ad7efd335429ee2ffb /libextra | |
parent | d2c3f9c514ae1252d4f0e9f3a143c6aa360902db (diff) | |
download | gnutls-a3f0b548ac93fef4ba5e29212a0ee269a73c64b1.tar.gz |
Merge patch from Timo, applied to CVS.
(stream_to_datum): Call gnutls_assert() on error.
Diffstat (limited to 'libextra')
-rw-r--r-- | libextra/gnutls_openpgp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index 7ed57da5d9..344b245ab9 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -533,13 +533,17 @@ stream_to_datum (cdk_stream_t inp, gnutls_datum_t * raw) gnutls_assert (); return GNUTLS_E_INVALID_REQUEST; } - + cdk_stream_mmap (inp, &buf, &buflen); datum_append (raw, buf, buflen); cdk_free (buf); - + if (!buflen) - return GNUTLS_E_INTERNAL_ERROR; + { + gnutls_assert (); + return GNUTLS_E_INTERNAL_ERROR; + } + return 0; } |