From: Nikos Mavrogiannopoulos Date: Wed, 2 Jan 2002 12:15:06 +0000 (+0000) Subject: more error checking X-Git-Tag: gnutls_0_3_2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb16dda5ff37e321a92523f79ecd030cf906dc53;p=thirdparty%2Fgnutls.git more error checking --- diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index 25ca7f2f8e..059e608823 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -190,7 +190,7 @@ int gnutls_fingerprint_calc(DigestAlgorithm algo, gnutls_datum data, char* resul GNUTLS_HASH_HANDLE td; int hash_len = gnutls_hash_get_algo_len(algo); - if (hash_len > *result_size) { + if (hash_len > *result_size || hash_len < 0) { *result_size = hash_len; return GNUTLS_E_INVALID_REQUEST; }