Changeset 693 for branches/samba-3.0/source/smbd/process.c
- Timestamp:
- Mar 11, 2012, 6:19:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/smbd/process.c
r468 r693 1026 1026 int msg_type = CVAL(inbuf,0); 1027 1027 uint16_t mid = SVAL(inbuf, smb_mid); 1028 uint8_t wct = CVAL(inbuf, smb_wct); 1028 1029 1029 1030 chain_size = 0; … … 1033 1034 if (msg_type != 0) 1034 1035 return(reply_special(inbuf,outbuf)); 1036 1037 /* Ensure we have at least wct words and 2 bytes of bcc. */ 1038 if (smb_size + wct*2 > size) { 1039 DEBUG(0,("init_smb_request: invalid wct number %u (size %u)\n", 1040 (unsigned int)wct, 1041 (unsigned int)size)); 1042 exit_server_cleanly("Invalid SMB request"); 1043 } 1044 /* Ensure bcc is correct. */ 1045 if (((uint8 *)smb_buf(inbuf)) + smb_buflen(inbuf) > inbuf + size) { 1046 DEBUG(0,("init_smb_request: invalid bcc number %u " 1047 "(wct = %u, size %u)\n", 1048 (unsigned int)smb_buflen(inbuf), 1049 (unsigned int)wct, 1050 (unsigned int)size)); 1051 exit_server_cleanly("Invalid SMB request"); 1052 } 1035 1053 1036 1054 construct_reply_common(inbuf, outbuf); … … 1162 1180 static int orig_size; 1163 1181 int smb_com1, smb_com2 = CVAL(inbuf,smb_vwv0); 1164 unsigned smb_off2 = SVAL(inbuf,smb_vwv1);1182 static unsigned smb_off2; 1165 1183 char *inbuf2, *outbuf2; 1166 1184 int outsize2; … … 1181 1199 orig_outbuf = outbuf; 1182 1200 orig_size = size; 1183 } 1201 smb_off2 = 0; 1202 } 1203 1204 if (SVAL(inbuf,smb_vwv1) <= smb_off2) { 1205 DEBUG(1, ("AndX offset not increasing\n")); 1206 SCVAL(outbuf, smb_vwv0, 0xFF); 1207 return outsize; 1208 } 1209 smb_off2 = SVAL(inbuf, smb_vwv1); 1184 1210 1185 1211 /* Validate smb_off2 */
Note:
See TracChangeset
for help on using the changeset viewer.