]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: small underflow in cnvrtDosUnixTm()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 May 2017 18:43:43 +0000 (21:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 09:57:34 +0000 (10:57 +0100)
commitc4eee23a7ce7fef8740a6f989830bc4d72144197
treefa46594644aac8b4dde4af8dd7159e132b8ddef3
parent6f9612c99c20a9a2537f50b4bd7289411c4a96a2
cifs: small underflow in cnvrtDosUnixTm()

[ Upstream commit 564277eceeca01e02b1ef3e141cfb939184601b4 ]

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: 1bd5bbcb6531 ("[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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/netmisc.c