Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1288765

[PATCH 4.3 1/2] crypto: asymmetric_keys - remove always false comparison

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.3 1/2] crypto: asymmetric_keys - remove always false comparison
Date 2015-12-10 19:10 +0100
Message-ID <qEdPd-1ez-9@gated-at.bofh.it> (permalink)
References <qEdPc-1ez-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.3-stable review patch.  If anyone has any objections, please let me know.

------------------

From: sudip <sudipm.mukherjee@gmail.com>

commit 4dd17c9c8a30c8d8cd1c9d4b94f08aca4b038d3e upstream.

hour, min and sec are unsigned int and they can never be less than zero.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.3 0/2] 4.3.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-10 19:10 +0100
  [PATCH 4.3 2/2] X.509: Fix the time validation [ver #2] Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-10 19:10 +0100
  [PATCH 4.3 1/2] crypto: asymmetric_keys - remove always false comparison Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-10 19:10 +0100
  Re: [PATCH 4.3 0/2] 4.3.2-stable review Alexander Holler <holler@ahsoftware.de> - 2015-12-10 19:40 +0100
    Re: [PATCH 4.3 0/2] 4.3.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-10 19:50 +0100
  Re: [PATCH 4.3 0/2] 4.3.2-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-12-10 22:00 +0100
    Re: [PATCH 4.3 0/2] 4.3.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-10 22:10 +0100
  Re: [PATCH 4.3 0/2] 4.3.2-stable review Guenter Roeck <linux@roeck-us.net> - 2015-12-10 22:50 +0100
    Re: [PATCH 4.3 0/2] 4.3.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-11 00:10 +0100

csiph-web