RE: Invalid use of const pointer?

2022-01-09 Thread Joe Filion
 Regarding: “This Thanks mostly goes to Joe Filion who initally noticed this.” Your welcome. If interested, I found another similar construct in another area of the code. Don’t worry, this appears to be the last one. On line 557 of implicit.c:   p = strchr (nptr, '%'); nptr is a con

Re: Invalid use of const pointer?

2022-01-09 Thread Henrik Carlqvist
On Sun, 09 Jan 2022 10:17:10 -0500 Paul Smith wrote: > In any event, the bug still exists whether you say the argument is > const or not: the expectation when this function is called is that > after it returns the string passed to it has the same content as before > it was called. If so I agree t

Re: Invalid use of const pointer?

2022-01-09 Thread Paul Smith
On Sun, 2022-01-09 at 11:06 +0100, Henrik Carlqvist wrote: > On Sat, 08 Jan 2022 17:29:33 -0500 Paul Smith wrote: > > It turns out to be innocuous because none of the callers care that > > the value of the input string is modified if we return a different > > string, but it's still wrong and shoul

Re: Invalid use of const pointer?

2022-01-09 Thread Henrik Carlqvist
On Sat, 08 Jan 2022 17:29:33 -0500 Paul Smith wrote: > It turns out to be innocuous because none of the callers care that the > value of the input string is modified if we return a different string, > but it's still wrong and should be fixed. If so, the easy and more correct fix might be to to re