Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754922AbbLJSEB (ORCPT ); Thu, 10 Dec 2015 13:04:01 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60212 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754578AbbLJSD7 (ORCPT ); Thu, 10 Dec 2015 13:03:59 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudip Mukherjee , Herbert Xu Subject: [PATCH 4.3 1/2] crypto: asymmetric_keys - remove always false comparison Date: Thu, 10 Dec 2015 13:03:47 -0500 Message-Id: <20151210180242.523377841@linuxfoundation.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <20151210180242.442372039@linuxfoundation.org> References: <20151210180242.442372039@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1261 Lines: 40 4.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: sudip commit 4dd17c9c8a30c8d8cd1c9d4b94f08aca4b038d3e upstream. hour, min and sec are unsigned int and they can never be less than zero. Signed-off-by: Sudip Mukherjee Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/asymmetric_keys/x509_cert_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/crypto/asymmetric_keys/x509_cert_parser.c +++ b/crypto/asymmetric_keys/x509_cert_parser.c @@ -546,9 +546,9 @@ int x509_decode_time(time64_t *_t, size if (year < 1970 || mon < 1 || mon > 12 || day < 1 || day > mon_len || - hour < 0 || hour > 23 || - min < 0 || min > 59 || - sec < 0 || sec > 59) + hour > 23 || + min > 59 || + sec > 59) goto invalid_time; *_t = mktime64(year, mon, day, hour, min, sec); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/