Re: Static analysis fix request - Mailing list pgsql-odbc

From Heikki Linnakangas
Subject Re: Static analysis fix request
Date
Msg-id 52CA8222.4000208@vmware.com
Whole thread Raw
In response to Static analysis fix request  (Pavel Raiskup <praiskup@redhat.com>)
List pgsql-odbc
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

Attachment

pgsql-odbc by date:

Previous
From: Pavel Raiskup
Date:
Subject: Static analysis fix request
Next
From: Pavel Raiskup
Date:
Subject: Re: Static analysis fix request