mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-09-21 20:11:08 +00:00
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: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
afe8a88755
commit
9587fcff42
|
@ -578,12 +578,12 @@ incomplete_rcv:
|
||||||
else if (reconnect == 1)
|
else if (reconnect == 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
length += 4; /* account for rfc1002 hdr */
|
total_read += 4; /* account for rfc1002 hdr */
|
||||||
|
|
||||||
|
dump_smb(smb_buffer, total_read);
|
||||||
dump_smb(smb_buffer, length);
|
if (checkSMB(smb_buffer, smb_buffer->Mid, total_read)) {
|
||||||
if (checkSMB(smb_buffer, smb_buffer->Mid, total_read+4)) {
|
cifs_dump_mem("Bad SMB: ", smb_buffer,
|
||||||
cifs_dump_mem("Bad SMB: ", smb_buffer, 48);
|
total_read < 48 ? total_read : 48);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue