mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
parent
6fee08daab
commit
3e098f90df
@ -271,7 +271,7 @@ pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PBUF_RAM: {
|
case PBUF_RAM: {
|
||||||
u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
|
mem_size_t payload_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
|
||||||
mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
|
mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
|
||||||
|
|
||||||
/* bug #50040: Check for integer overflow when calculating alloc_len */
|
/* bug #50040: Check for integer overflow when calculating alloc_len */
|
||||||
|
Loading…
Reference in New Issue
Block a user