lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Possible SNTP bug


From: Bernhard 'Gustl' Bauer
Subject: [lwip-users] Possible SNTP bug
Date: Mon, 29 Aug 2011 13:38:17 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0

Hi,

I'm using lwip 1.3, NO_SYS. I know it is not up to date, but the contrib 1.4 for sntp has not changed much since 1.3 and I checked the differences.

My problem is: the HEAP has an overflow when the time server could not be reached. The pbuf_alloc() in sntp_send_request() has no matching pbuf_free() in this case. The only pbuf_free() I found is in sntp_recv(), so pbuf can only be freed when there is an answer. sntp_send() is called repeatedly by sntp_retry().

Even when the time server can be reached there is a slight increase in used HEAP space. But this could be dropped packets which would have the same effect due to the above error.

I can think of 2 solutions: Use always the same pbuf, or free it during sntp_retry. Some pointers how to do this the right way would be great.

TIA

Gustl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]