bug-texinfo
[Top][All Lists]
Advanced

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

Re: texinfo-6.7.91 pretest


From: Per Bothner
Subject: Re: texinfo-6.7.91 pretest
Date: Fri, 18 Jun 2021 09:07:59 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 6/18/21 8:32 AM, Gavin Smith wrote:
If we were going to mess about with this code it would be better
to rewrite it to use neither strncat not strcat.

Indeed - the code is sufficiently complex that I could not be sure there is no
buffer overflow, for example.

Are we guaranteed that the 'description' is at least two bytes shorter
(to make room for final newline plus final null) than strlen(entry) ?
Probably, but there is no comment explaining why, and you'd have to look
caefully to make sure there no case that could risk overflow.
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

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