Skip site navigation (1) Skip section navigation (2)

Re: Possible bug in

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Fedechicco <fedechicco(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Possible bug in
Date: 2012-04-27 06:25:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
> From what I've seen the line 48 and the following are:
> while (l_chars[l_pos] != '\0' && l_pos < l_length)
> {
>         l_pos++;
> }
> which IMO should be changed in:
> while (l_pos < l_length && l_chars[l_pos] != '\0')

This seems to be the code in question, to decode the wire ErrorResponse message:

Although what you suggested would be more defensive coding, if you
look at the message specification [1], I believe the current code
*should* process any well-formed ErrorResponse message correctly. As
Dave asked, is this consistently reproducible? Also, are you in a
position to make the change you suggested, rebuild the driver, and
retry it yourself? If so, do you get a different message?

Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main

In response to


pgsql-jdbc by date

Next:From: FedechiccoDate: 2012-04-27 07:48:57
Subject: Re: Possible bug in
Previous:From: Dave CramerDate: 2012-04-27 00:43:41
Subject: Re: Possible bug in

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group