]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: remove bogus debug code
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 16 Sep 2020 20:18:21 +0000 (23:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:03:01 +0000 (09:03 +0100)
commitfb0a8e9824989401c3a4175d7466f4133a96d43e
tree10d9f9e2a19cbb4dbd2755a97a6c62a1b221a71e
parenta9d0ba6aa7485aabed7b8f2ed5a3975684847e0b
cifs: remove bogus debug code

commit d367cb960ce88914898cbfa43645c2e43ede9465 upstream.

The "end" pointer is either NULL or it points to the next byte to parse.
If there isn't a next byte then dereferencing "end" is an off-by-one out
of bounds error.  And, of course, if it's NULL that leads to an Oops.
Printing "*end" doesn't seem very useful so let's delete this code.

Also for the last debug statement, I noticed that it should be printing
"sequence_end" instead of "end" so fix that as well.

Reported-by: Dominik Maier <dmaier@sect.tu-berlin.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/asn1.c