From d5d18501090179d557a4ca976d1c30bfaf5de091 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 17 Oct 2007 21:31:52 +0000 Subject: [CIFS] Fix minor problems noticed by scan Coverity scan pointed out some minor possible errors. Signed-off-by: Steve French --- fs/cifs/netmisc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs/cifs/netmisc.c') diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index 2bfed3f45d0f..9ae4941cd61d 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c @@ -899,8 +899,11 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time) cERROR(1, ("illegal hours %d", st->Hours)); days = sd->Day; month = sd->Month; - if ((days > 31) || (month > 12)) + if ((days > 31) || (month > 12)) { cERROR(1, ("illegal date, month %d day: %d", month, days)); + if (month > 12) + month = 12; + } month -= 1; days += total_days_of_prev_months[month]; days += 3652; /* account for difference in days between 1980 and 1970 */ -- cgit v1.2.3