fixed bug #39683 Assertion "seg->tcphdr not aligned" failed with MEM_ALIGNMENT = 8

This commit is contained in:
Simon Goldschmidt 2014-02-20 22:35:37 +01:00
parent 9572db262c
commit 2225b8add7
2 changed files with 5 additions and 1 deletions

View File

@ -96,6 +96,10 @@ HISTORY
++ Bugfixes:
2014-02-20: Simon Goldschmidt
* tcp_out.c: fixed bug #39683 Assertion "seg->tcphdr not aligned" failed with
MEM_ALIGNMENT = 8
2014-02-20: Simon Goldschmidt
* sockets.c: fixed bug #39882 No function shall set errno to 0

View File

@ -789,7 +789,7 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags)
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
}
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % MEM_ALIGNMENT) == 0);
LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % 4) == 0);
LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE,