提交 9587fcff 编写于 作者: J Jeff Layton 提交者: Steve French

cifs: fix length vs. total_read confusion in cifs_demultiplex_thread

length at this point is the length returned by the last kernel_recvmsg
call. total_read is the length of all of the data read so far. length
is more or less meaningless at this point, so use total_read for
everything.
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 afe8a887
......@@ -578,12 +578,12 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
else if (reconnect == 1)
continue;
length += 4; /* account for rfc1002 hdr */
total_read += 4; /* account for rfc1002 hdr */
dump_smb(smb_buffer, length);
if (checkSMB(smb_buffer, smb_buffer->Mid, total_read+4)) {
cifs_dump_mem("Bad SMB: ", smb_buffer, 48);
dump_smb(smb_buffer, total_read);
if (checkSMB(smb_buffer, smb_buffer->Mid, total_read)) {
cifs_dump_mem("Bad SMB: ", smb_buffer,
total_read < 48 ? total_read : 48);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册