Fix digest ctx initalization
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 4 Apr 2016 09:42:55 +0000 (11:42 +0200)
committerMateusz Kulikowski <m.kulikowski@samsung.com>
Thu, 7 Apr 2016 09:23:31 +0000 (11:23 +0200)
Change-Id: I65dfef2680303ff51106ad86d739f07c763646ec

src/digest.c

index 3d63cba8cab283701a18fc786e9246dbb7b2c6ca..821a3fa5966fad86865029e7d4f85ebc94b0e641 100644 (file)
@@ -111,7 +111,7 @@ API int owl_digest_init(owl_ctx_h *ctx, owl_digest_algo_e algo)
 
        ret = EVP_DigestInit(nc->mdctx, nc->md);
        if (ret == 1) {
-               *ctx = (owl_ctx_h)&nc;
+               *ctx = (owl_ctx_h)nc;
                return 0;
        }
        ret = OWL_ERROR_OPENSSL_FAILURE; // TODO: owl_get_error_code_from_openssl(ret);