]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: missing check for NULL in convert_to_nt_pathname()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 30 Sep 2021 12:24:56 +0000 (15:24 +0300)
committerSteve French <stfrench@microsoft.com>
Fri, 1 Oct 2021 01:00:05 +0000 (20:00 -0500)
commita126bfc0b0aebfced5f4bd5806298bb3210d8126
tree3d924c129340db845b9c8d7e87e70d876db1d032
parent43bacdb9fb7a176ebba281a29a285c5509267485
ksmbd: missing check for NULL in convert_to_nt_pathname()

The kmalloc() does not have a NULL check.  This code can be re-written
slightly cleaner to just use the kstrdup().

Fixes: 74ebf2bc881f ("ksmbd: use LOOKUP_BENEATH to prevent the out of share access")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Acked-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/misc.c