Unverified Commit f99278bc authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 0e1a9c9e 8e266ede
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -344,6 +344,10 @@ checkSMB(char *buf, unsigned int total_read, struct TCP_Server_Info *server)
			cifs_dbg(VFS, "Length less than smb header size\n");
		}
		return -EIO;
	} else if (total_read < sizeof(*smb) + 2 * smb->WordCount) {
		cifs_dbg(VFS, "%s: can't read BCC due to invalid WordCount(%u)\n",
			 __func__, smb->WordCount);
		return -EIO;
	}

	/* otherwise, there is enough to get to the BCC */