From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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> To: unlisted-recipients:; (no To-header on input) Sender: stable-owner@vger.kernel.org List-ID: David Howells wrote: > + if (!rp) { > + if (mpi_resize(res, 1) < 0) This is better done with RESIZE_IF_NEEDED(). David