Changeset 11551
- Timestamp:
- 10/22/19 21:34:17 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-dvbapi.c
r11550 r11551 6164 6164 commandsize = 4; 6165 6165 sizebytes = *tmp_data_len; 6166 if( 3+ sizebytes < mbuf_len)6166 if(commandsize + sizebytes < mbuf_len) 6167 6167 { 6168 6168 *tmp_data_len = b2i(sizebytes, mbuf + 4); … … 6252 6252 } 6253 6253 6254 if( mbuf_len < commandsize + tmp_data_len)6254 if(tmp_data_len + commandsize > mbuf_len) 6255 6255 { 6256 6256 cs_log("dvbapi_get_packet_size(): error - buffer length (%" PRIu16 ") too short for %s", mbuf_len, command); … … 6264 6264 tmp_data_len = 0xFFFF - commandsize; 6265 6265 } 6266 6267 (*data_len) = tmp_data_len; 6268 (*chunksize) += msgid_size + commandsize + tmp_data_len; 6266 6269 6267 (*data_len) = tmp_data_len;6268 6269 if((*data_len) < 1)6270 {6271 cs_log("Socket command without data => ignoring!");6272 set_chunksize_data_len_to_invalid(chunksize, data_len);6273 return;6274 }6275 6276 (*chunksize) += msgid_size + commandsize + (*data_len);6277 6270 cs_log_dbg(D_DVBAPI, "Got %s packet with size %" PRIu16, command,(*chunksize)); 6278 6271 }
Note:
See TracChangeset
for help on using the changeset viewer.