mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +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:
|
||||
|
||||
2014-02-25: Simon Goldschmidt, patch by Fatih Asici
|
||||
* pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind()
|
||||
|
||||
2014-02-25: Simon Goldschmidt
|
||||
* 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()
|
||||
|
@ -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 max = p->tot_len - mem_len;
|
||||
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);
|
||||
if (plus == 0) {
|
||||
return i;
|
||||
} else {
|
||||
i += plus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user