diff options
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; } |