On 04/09/2017 11:28 PM, Simon Kelley wrote:
Patch accepted, with one change

          snprintf(daemon->namebuff+oldlen, sizeof(daemon->namebuff)-oldlen, 

daemon->namebuff is a char *, so sizeof(daemon->namebuff) is 4 or 8 and
sizeof(daemon->namebuff)-oldlen is a negative number which is a large
positive number when promoted  to unsigned size_t.

Ah, you are right.

Somehow I had the impression it was a fixed size array, on which sizeof() do would work. Probably confused it with the other namebuff in tftp_request ( char namebuff[IF_NAMESIZE]; )

Sorry, and thanks for the commit.

Yours sincerely,

Floris Bos

Dnsmasq-discuss mailing list

Reply via email to