From: Herbert Xu Subject: Re: [PATCH 2/2] crypto: user - fix empty string test in report API Date: Mon, 4 Feb 2013 21:15:52 +0800 Message-ID: <20130204131552.GA21584@gondor.apana.org.au> References: <1359889741-23335-1-git-send-email-minipli@googlemail.com> <1359889741-23335-3-git-send-email-minipli@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Steffen Klassert , linux-crypto@vger.kernel.org To: Mathias Krause Return-path: Received: from sting.hengli.com.au ([178.18.18.71]:37640 "EHLO fornost.hengli.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755066Ab3BDNQH (ORCPT ); Mon, 4 Feb 2013 08:16:07 -0500 Content-Disposition: inline In-Reply-To: <1359889741-23335-3-git-send-email-minipli@googlemail.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Sun, Feb 03, 2013 at 12:09:01PM +0100, Mathias Krause wrote: > The current test for empty strings fails because it is testing the > address of a field, not a pointer. So the test will always be true. > Test for the string length instead. > > Signed-off-by: Mathias Krause > Cc: Steffen Klassert Good catch. However, what if cru_driver_name isn't NUL-terminated? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt