All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Sudip Mukherjee <sudip@vectorindia.org>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: [PATCH 4.3 1/2] crypto: asymmetric_keys - remove always false comparison
Date: Thu, 10 Dec 2015 13:03:47 -0500	[thread overview]
Message-ID: <20151210180242.523377841@linuxfoundation.org> (raw)
In-Reply-To: <20151210180242.442372039@linuxfoundation.org>

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);



  reply	other threads:[~2015-12-10 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 18:03 [PATCH 4.3 0/2] 4.3.2-stable review Greg Kroah-Hartman
2015-12-10 18:03 ` Greg Kroah-Hartman [this message]
2015-12-10 18:03 ` [PATCH 4.3 2/2] X.509: Fix the time validation [ver #2] Greg Kroah-Hartman
2015-12-10 18:38 ` [PATCH 4.3 0/2] 4.3.2-stable review Alexander Holler
2015-12-10 18:42   ` Greg Kroah-Hartman
2015-12-10 20:58 ` Shuah Khan
2015-12-10 21:03   ` Greg Kroah-Hartman
2015-12-10 21:48 ` Guenter Roeck
2015-12-10 23:03   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151210180242.523377841@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sudip@vectorindia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.