[Top][All Lists]

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

[lwip-devel] [bug #51729] lwip_itoa: fix converting 0

From: David GIRAULT
Subject: [lwip-devel] [bug #51729] lwip_itoa: fix converting 0
Date: Mon, 8 Jan 2018 10:24:24 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36

Follow-up Comment #6, bug #51729 (project lwip):

New version is still buggy. It can write outside provided buffer if buffer
isn't large enough:

char buf[4];
lwip_itoa(buf, 4, 1192);

This will write '1' at *(buf-1) !!!

Additionaly, why persisting to put "." in the buffer if it's too small at the
end while, at same time, just an empty string is return at the beggining if to
buffer_size < 2? This require caller to check both condition instead of just
an empty string.

Since I provided a patch earlier, any reason to not use it directly?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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