Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965197AbcKXLSE (ORCPT ); Thu, 24 Nov 2016 06:18:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57764 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964967AbcKXLSB (ORCPT ); Thu, 24 Nov 2016 06:18:01 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <147997747766.9316.11606802798600210253.stgit@warthog.procyon.org.uk> References: <147997747766.9316.11606802798600210253.stgit@warthog.procyon.org.uk> <147997746306.9316.227351186233378585.stgit@warthog.procyon.org.uk> Cc: dhowells@redhat.com, jmorris@namei.org, Dmitry Kasatkin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-ima-devel@lists.sourceforge.net Subject: Re: [PATCH 2/2] MPI: Fix mpi_powm() when exponent is 0 and the result has no limbs MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5322.1479986239.1@warthog.procyon.org.uk> Date: Thu, 24 Nov 2016 11:17:19 +0000 Message-ID: <5323.1479986239@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 24 Nov 2016 11:17:21 +0000 (UTC) To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 147 Lines: 8 David Howells wrote: > + if (!rp) { > + if (mpi_resize(res, 1) < 0) This is better done with RESIZE_IF_NEEDED(). David