From 355bab380cad6c7e714849d8ea20e2c2ed0dab7b Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Wed, 10 Jun 2009 15:33:39 +0200 Subject: [PATCH] additional check in case of non-positive months --- src/libstrongswan/asn1/asn1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstrongswan/asn1/asn1.c b/src/libstrongswan/asn1/asn1.c index b8ee5c28a..d2078cbbc 100644 --- a/src/libstrongswan/asn1/asn1.c +++ b/src/libstrongswan/asn1/asn1.c @@ -383,9 +383,9 @@ time_t asn1_to_time(const chunk_t *utctime, asn1_t type) } /* representation of months as 0..11*/ - if (tm_mon > 12) + if (tm_mon < 1 || tm_mon > 12) { - return 0; /* error in time format */ + return 0; /* error in month format */ } tm_mon--;