Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp392649imm; Thu, 11 Oct 2018 23:23:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Bi5L8OjVddt0ULrm1hCHHAs2NLVd68f8k5202zXhty7bYdTk/h4RvXuxTXqrgYimhcjMS X-Received: by 2002:a62:3995:: with SMTP id u21-v6mr4821913pfj.116.1539325434365; Thu, 11 Oct 2018 23:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539325434; cv=none; d=google.com; s=arc-20160816; b=WzqPvRCjF1gT8g3nzqsomqeHvI0I24s77jZ7wo62OXg2WQztvOXiHv7rMXSMPW1h5f m0cVxaj6C9FMnQRJnUHW0MBK/XGNJP4ZpHiYKpurHS5gLbqE/BhavZk15WT+jJjEPYD+ eOBIYlYabr+D9Ryc4GLiZMoG5vrNSUZ5x8gH8cDK11PKayb+8TKLfbA/zYH2zKjUdsaL WqR7X0ydWORCJTWL3M2SX5njulWX1UNNv6v0OdgZn7OqLTiHpCdZltlh/KK/FED1XxbS UTGV1SFpvfCQtjvRG5lZANMlXRHyHZGLWXxi137QV7WhqZieuw8u8JubBkJrjqYjYyuy P3gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PuMPTir8RlNHALthi8riu0vL0smCe8NpDFazkOTbQKI=; b=NacWze8fkcbePrJbnosMdE3JBc4k12qTq0eUkK0CAUeMrsNm54WjMA4jR3efpBKN+p y6VNgYaoqhgntFmF8DPBoshxk72E7HwbVfXHD0mCW5QoKpiiidGpskNyITrezCx7FAQq 3h846eX9lZ/9lkP9l8Tk64sT7T85KmdtyqdhORghxac8oyYucjL2R9bjdjdLCkOtffmI wUrvec6HmfGe8vORZLdtFx2Nj68+MDrqXktt+EFMEJDk0trBiQcW+oDRIsm06Ne20Or7 Gs7JLX1nvmecYov4cGpuw70fowpOVRHRIzkpElkNtpc526M+/Om48fvikPzJQHdmkDp9 QNTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r68-v6si276434pfk.151.2018.10.11.23.23.37; Thu, 11 Oct 2018 23:23:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbeJLNyJ (ORCPT + 99 others); Fri, 12 Oct 2018 09:54:09 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:53884 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727056AbeJLNyJ (ORCPT ); Fri, 12 Oct 2018 09:54:09 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1gAqqu-0005mX-Os; Fri, 12 Oct 2018 14:23:12 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1gAqqs-0005Le-GA; Fri, 12 Oct 2018 14:23:10 +0800 Date: Fri, 12 Oct 2018 14:23:10 +0800 From: Herbert Xu To: Michael Schupikov Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto/testmgr.c: fix sizeof() on COMP_BUF_SIZE Message-ID: <20181012062310.4z2porvtpib5imfn@gondor.apana.org.au> References: <20181007115810.27779-1-michael@schupikov.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181007115810.27779-1-michael@schupikov.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 07, 2018 at 01:58:10PM +0200, Michael Schupikov wrote: > After allocation, output and decomp_output both point to memory chunks of > size COMP_BUF_SIZE. Then, only the first bytes are zeroed out using > sizeof(COMP_BUF_SIZE) as parameter to memset(), because > sizeof(COMP_BUF_SIZE) provides the size of the constant and not the size of > allocated memory. > > Instead, the whole allocated memory is meant to be zeroed out. Use > COMP_BUF_SIZE as parameter to memset() directly in order to accomplish > this. > > Fixes: 336073840a872 ("crypto: testmgr - Allow different compression results") > > Signed-off-by: Michael Schupikov > --- > crypto/testmgr.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt