diff options
author | sudip <sudipm.mukherjee@gmail.com> | 2015-09-17 13:12:51 +0530 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-09-21 22:00:40 +0800 |
commit | 4dd17c9c8a30c8d8cd1c9d4b94f08aca4b038d3e (patch) | |
tree | 4a71453c20cec90bf4bc3274e093105d170fee1b /crypto | |
parent | 3cc43a0a5cea4fe2a2107e77500d6032b9bcafde (diff) | |
download | op-kernel-dev-4dd17c9c8a30c8d8cd1c9d4b94f08aca4b038d3e.zip op-kernel-dev-4dd17c9c8a30c8d8cd1c9d4b94f08aca4b038d3e.tar.gz |
crypto: asymmetric_keys - remove always false comparison
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asymmetric_keys/x509_cert_parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c index af71878..3000ea3 100644 --- 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_t hdrlen, 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); |