Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24977
b: refs/heads/master
c: 46c79a6
h: refs/heads/master
i:
  24975: 2d83faa
v: v3
  • Loading branch information
Steve French committed Mar 2, 2006
1 parent 0ab2a09 commit 9b1033a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f26282c9af43c1aff3f448af61429625174ddf06
refs/heads/master: 46c79a645a00e71dbbfd5f52abe0ea7cf2d5daa3
13 changes: 8 additions & 5 deletions trunk/fs/cifs/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
sizeof (struct smb_hdr) - 1)
&& (smb->Status.CifsError != 0)) {
smb->WordCount = 0;
return 0; /* some error cases do not return wct and bcc */
/* some error cases do not return wct and bcc */
return 0;
} else {
cERROR(1, ("Length less than smb header size"));
}
Expand All @@ -456,9 +457,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
if(((4 + len) & 0xFFFF) == (clc_len & 0xFFFF))
return 0; /* bcc wrapped */
}
cERROR(1, ("Calculated size 0x%x vs actual length 0x%x",
clc_len, 4 + len));
cERROR(1, ("bad smb size detected for Mid=%d", smb->Mid));
cFYI(1, ("Calculated size %d vs length %d mismatch for mid %d",
clc_len, 4 + len, smb->Mid));
/* Windows XP can return a few bytes too much, presumably
an illegal pad, at the end of byte range lock responses
so we allow for that three byte pad, as long as actual
Expand All @@ -472,8 +472,11 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length)
wct and bcc to minimum size and drop the t2 parms and data */
if((4+len > clc_len) && (len <= clc_len + 512))
return 0;
else
else {
cERROR(1, ("RFC1001 size %d bigger than SMB for Mid=%d",
len, smb->Mid));
return 1;
}
}
return 0;
}
Expand Down

0 comments on commit 9b1033a

Please sign in to comment.