|
|
|
@ -71,8 +71,8 @@ static void feed_dgram_to_asm(struct ETCP_CONN* etcp, struct PKTNORM* pn, |
|
|
|
uint8_t* dgram, uint16_t dgram_len, |
|
|
|
uint8_t* dgram, uint16_t dgram_len, |
|
|
|
uint8_t** asm_buf, uint16_t* asm_len, uint16_t* asm_cap, |
|
|
|
uint8_t** asm_buf, uint16_t* asm_len, uint16_t* asm_cap, |
|
|
|
uint32_t* returned) { |
|
|
|
uint32_t* returned) { |
|
|
|
uint16_t need = *asm_len + dgram_len; |
|
|
|
uint32_t need = (uint32_t)*asm_len + dgram_len; |
|
|
|
if (need > ASM_BUF_MAX_SIZE) { |
|
|
|
if (need >= ASM_BUF_MAX_SIZE) { |
|
|
|
DEBUG_ERROR(DEBUG_CATEGORY_ETCP, "[%s] assembly buffer would exceed max size %d", etcp->log_name, ASM_BUF_MAX_SIZE); |
|
|
|
DEBUG_ERROR(DEBUG_CATEGORY_ETCP, "[%s] assembly buffer would exceed max size %d", etcp->log_name, ASM_BUF_MAX_SIZE); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|