[CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpages

Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French
2005-12-12 20:53:18 -08:00
parent c89a86bb96
commit ec637e3ffb
11 changed files with 156 additions and 108 deletions

View File

@@ -299,7 +299,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
struct cifsSesInfo * ses;
char *temp = (char *) buffer;
memset(temp,0,MAX_CIFS_HDR_SIZE);
memset(temp,0,256); /* bigger than MAX_CIFS_HDR_SIZE */
buffer->smb_buf_length =
(2 * word_count) + sizeof (struct smb_hdr) -