Commit d367cb96 authored by Dan Carpenter's avatar Dan Carpenter Committed by Steve French
Browse files

cifs: remove bogus debug code



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: default avatarDominik Maier <dmaier@sect.tu-berlin.de>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 1af34fdd
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -530,8 +530,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,
		return 0;
	} else if ((cls != ASN1_CTX) || (con != ASN1_CON)
		   || (tag != ASN1_EOC)) {
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 0\n",
			 cls, con, tag, end, *end);
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p exit 0\n",
			 cls, con, tag, end);
		return 0;
	}

@@ -541,8 +541,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,
		return 0;
	} else if ((cls != ASN1_UNI) || (con != ASN1_CON)
		   || (tag != ASN1_SEQ)) {
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 1\n",
			 cls, con, tag, end, *end);
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p exit 1\n",
			 cls, con, tag, end);
		return 0;
	}

@@ -552,8 +552,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,
		return 0;
	} else if ((cls != ASN1_CTX) || (con != ASN1_CON)
		   || (tag != ASN1_EOC)) {
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 0\n",
			 cls, con, tag, end, *end);
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p exit 0\n",
			 cls, con, tag, end);
		return 0;
	}

@@ -564,8 +564,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,
		return 0;
	} else if ((cls != ASN1_UNI) || (con != ASN1_CON)
		   || (tag != ASN1_SEQ)) {
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 1\n",
			 cls, con, tag, end, *end);
		cifs_dbg(FYI, "cls = %d con = %d tag = %d sequence_end = %p exit 1\n",
			 cls, con, tag, sequence_end);
		return 0;
	}