Re: Possible bug in ServerErrorMessage.java
| От | ml-tb |
|---|---|
| Тема | Re: Possible bug in ServerErrorMessage.java |
| Дата | |
| Msg-id | 201204271013.57993.ml-tb@emagixx.de обсуждение |
| Ответ на | Re: Possible bug in ServerErrorMessage.java (Maciek Sakrejda <msakrejda@truviso.com>) |
| Ответы |
Re: Possible bug in ServerErrorMessage.java
|
| Список | pgsql-jdbc |
Am Freitag, 27. April 2012 schrieb Maciek Sakrejda:
> > 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:
>
> https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/util/Serv
> erErrorMessage.java#L32
>
> Although what you suggested would be more defensive coding,
Sorry for correct you at this point: The suggested code ist not more
defensive but the only correct way for a save (unsyncronised) array
access.
Bye Thomas
В списке pgsql-jdbc по дате отправления: