Fix CVE-2017-6891 in minitasn1 code
[platform/upstream/gnutls.git] / lib / gnutls_hash_int.h
index 2e00b8c..75061c8 100644 (file)
@@ -40,13 +40,13 @@ typedef int (*hash_func) (void *handle, const void *text, size_t size);
 typedef int (*nonce_func) (void *handle, const void *text, size_t size);
 typedef int (*output_func) (void *src_ctx, void *digest,
                            size_t digestsize);
-typedef void (*hash_deinit_func) (void *handle);
+typedef void (*deinit_func) (void *handle);
 
 typedef struct {
        const mac_entry_st *e;
        hash_func hash;
        output_func output;
-       hash_deinit_func deinit;
+       deinit_func deinit;
 
        const void *key;        /* esoteric use by SSL3 MAC functions */
        int keysize;
@@ -61,7 +61,7 @@ typedef struct {
        hash_func hash;
        nonce_func setnonce;
        output_func output;
-       hash_deinit_func deinit;
+       deinit_func deinit;
 
        void *handle;
 } mac_hd_st;
@@ -110,7 +110,7 @@ inline static int
 _gnutls_hash(digest_hd_st * handle, const void *text, size_t textlen)
 {
        if (textlen > 0) {
-               return handle->hash(handle->handle, text, textlen);
+               handle->hash(handle->handle, text, textlen);
        }
        return 0;
 }