]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: small underflow in cnvrtDosUnixTm()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 May 2017 18:43:43 +0000 (21:43 +0300)
committerSteve French <smfrench@gmail.com>
Tue, 2 May 2017 19:57:34 +0000 (14:57 -0500)
commit88724f3a6b366343c97287e0fcd6586024624800
tree57e17aa79a915acfe21d8e428c9be0c28df84c9e
parent75618a0ebe99f1dc1030a3d0c2e97bc388b8b28e
cifs: small underflow in cnvrtDosUnixTm()

January is month 1.  There is no zero-th month.  If someone passes a
zero month then it means we read from one space before the start of the
total_days_of_prev_months[] array.

We may as well also be strict about days as well.

Fixes: b4a16f92a496 ("[CIFS] Legacy time handling for Win9x and OS/2 part 1")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/netmisc.c