[Top][All Lists]

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

Re: [platform-testers] texinfo-6.6.90 pretest

From: Hans-Bernhard Bröker
Subject: Re: [platform-testers] texinfo-6.6.90 pretest
Date: Wed, 18 Sep 2019 22:41:15 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Am 18.09.2019 um 22:13 schrieb Gavin Smith:
> On Wed, Sep 18, 2019 at 9:07 PM Hans-Bernhard Bröker
> <address@hidden> wrote:
>> OTOH if what these calls are supposed to be doing is really is "copy n
>> bytes", it would be more honest to replace them by variations of
>>         memcpy (dest + strlen(dest), src, n);
>> (with some actual book-keeping to replace the repeated determination of
>> strlen(dest), obviously).
> This may be better although we'd have to check that the final string
> remained null-terminated in all instances.

For the cases in question, that'd be trivially easy, because the code
already knows exacly how many bytes it takes:

          memcpy(\1 + strlen(\1)\, \2 + 1

(no warranty on the escaping and syntax...)

reply via email to

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