]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
crypto: dh - comply with crypto_kpp_maxsize()
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>
Thu, 25 May 2017 07:18:09 +0000 (10:18 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 10 Jun 2017 04:04:27 +0000 (12:04 +0800)
crypto_kpp_maxsize() asks for the output buffer size without
caring for errors. It allways assume that will be called after
a valid setkey. Comply with it and return what he wants.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/dh.c

index e151f12775ca22d54990b6d1ec1512fb35db5e33..b1032a5c1bfa1a310653708d0517b5a73f14b868 100644 (file)
@@ -147,7 +147,7 @@ err_free_val:
        return ret;
 }
 
-static int dh_max_size(struct crypto_kpp *tfm)
+static unsigned int dh_max_size(struct crypto_kpp *tfm)
 {
        struct dh_ctx *ctx = dh_get_ctx(tfm);