mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-05 15:39:54 +00:00
fixed bug #39356 Wrong increment in pbuf_memfind()
This commit is contained in:
parent
dceed2ea5c
commit
e9908048ec
@ -96,6 +96,9 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2014-02-25: Simon Goldschmidt, patch by Fatih Asici
|
||||||
|
* pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind()
|
||||||
|
|
||||||
2014-02-25: Simon Goldschmidt
|
2014-02-25: Simon Goldschmidt
|
||||||
* netif.c/.h, udp.c: fixed bug #39225 udp.c uses netif_matches_ip6_addr() incorrectly;
|
* netif.c/.h, udp.c: fixed bug #39225 udp.c uses netif_matches_ip6_addr() incorrectly;
|
||||||
renamed function netif_matches_ip6_addr() to netif_get_ip6_addr_match()
|
renamed function netif_matches_ip6_addr() to netif_get_ip6_addr_match()
|
||||||
|
@ -1192,12 +1192,10 @@ pbuf_memfind(struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_offset)
|
|||||||
u16_t i;
|
u16_t i;
|
||||||
u16_t max = p->tot_len - mem_len;
|
u16_t max = p->tot_len - mem_len;
|
||||||
if (p->tot_len >= mem_len + start_offset) {
|
if (p->tot_len >= mem_len + start_offset) {
|
||||||
for(i = start_offset; i <= max; ) {
|
for(i = start_offset; i <= max; i++) {
|
||||||
u16_t plus = pbuf_memcmp(p, i, mem, mem_len);
|
u16_t plus = pbuf_memcmp(p, i, mem, mem_len);
|
||||||
if (plus == 0) {
|
if (plus == 0) {
|
||||||
return i;
|
return i;
|
||||||
} else {
|
|
||||||
i += plus;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user