On 01/06/2014 11:00 AM, Pavel Raiskup wrote:
> * Attached fix for overrun. This is imo worth fixing.
>
> * Attached added gcc & Coverity warnings (added between 9.2.1 and 9.3.1)
Ironically, I changed the code the way it is now, per previous static
analyzer report. It was off by even more before.
And I think it's still wrong :-). The code that follows expects the
prefix[] array to be terminated by a NULL entry.
That code is really difficult to read, and hence difficult to get
correct. Since we've already been burned twice by it, let's make it less
error-prone. How about the attached? Does that look correct to you?
(Perhaps we should just rip out the prefix stuff, though. It's only
there to support pre-7.3 servers)
- Heikki