Allow oversized buffers for provider cipher IV fetch
[openssl.git] / providers / implementations / ciphers / cipher_sm4.c
index bf9d2209238a87ef78e9aff5f640ea7971fa59be..caa7ff9c21962efd5c6d3700efdcf6c6df9bf932 100644 (file)
@@ -31,7 +31,7 @@ static void *sm4_dupctx(void *ctx)
         ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
         return NULL;
     }
-    *ret = *in;
+    in->base.hw->copyctx(&ret->base, &in->base);
 
     return ret;
 }