lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 7 May 2012 16:20:35 +0300
From:	"Kasatkin, Dmitry" <dmitry.kasatkin@...el.com>
To:	Adarsh J <root@...kmaster.in>
Cc:	James Morris <jmorris@...ei.org>,
	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
	Mimi Zohar <zohar@...ibm.com>,
	David Howells <dhowells@...hat.com>,
	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] lib/mpi: Fixed erroneous check on return value of mpi_resize()

On Sat, May 5, 2012 at 4:51 AM, Adarsh J <root@...kmaster.in> wrote:
> mpi_resize() returns -ENOMEM on error and 0 on success.
>
> Signed-off-by: Adarsh J <root@...kmaster.in>

Acked-by: Dmitry Kasatkin <dmitry.kasatkin@...el.com>

Thanks.

> ---
>  lib/mpi/mpicoder.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c
> index f26b41f..9949b69 100644
> --- a/lib/mpi/mpicoder.c
> +++ b/lib/mpi/mpicoder.c
> @@ -98,7 +98,7 @@ int mpi_fromstr(MPI val, const char *str)
>        nbytes = (nbits + 7) / 8;
>        nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB;
>        if (val->alloced < nlimbs)
> -               if (!mpi_resize(val, nlimbs))
> +               if (mpi_resize(val, nlimbs) < 0)
>                        return -ENOMEM;
>        i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB;
>        i %= BYTES_PER_MPI_LIMB;
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ