Bug in byteaout code in all PostgreSQL versions

Started by Sergey N. Yatskevichover 22 years ago4 messagesbugs
Jump to latest
#1Sergey N. Yatskevich
syatskevich@n21lab.gosniias.msk.ru

Hello!

bytea-test.cxx -- contains detailed description of the bug and test
plan and code.

varlena.c.diff -- patch for PostgreSQL 7.5devel
src/backend/utils/adt/varlena.c#byteaout
fe-exec.c.diff -- patch (optional) for PostgreSQL 7.5devel
src/interface/libpq/fe-exec.c#PQescapeBytea

test.data -- contains test data :-))

--
Sergey N. Yatskevich <syatskevich@n21lab.gosniias.msk.ru>
GosNIIAS

Attachments:

varlena.c.difftext/x-patch; charset=koi8-r; name=varlena.c.diffDownload+2-2
bytea-test.cxxtext/plain; charset=koi8-r; name=bytea-test.cxxDownload
test.dataapplication/octet-stream; name=test.dataDownload
fe-exec.c.difftext/x-patch; charset=koi8-r; name=fe-exec.c.diffDownload+3-4
#2Bruce Momjian
bruce@momjian.us
In reply to: Sergey N. Yatskevich (#1)
Re: Bug in byteaout code in all PostgreSQL versions

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Sergey N. Yatskevich wrote:

Hello!

bytea-test.cxx -- contains detailed description of the bug and test
plan and code.

varlena.c.diff -- patch for PostgreSQL 7.5devel
src/backend/utils/adt/varlena.c#byteaout
fe-exec.c.diff -- patch (optional) for PostgreSQL 7.5devel
src/interface/libpq/fe-exec.c#PQescapeBytea

test.data -- contains test data :-))

--
Sergey N. Yatskevich <syatskevich@n21lab.gosniias.msk.ru>
GosNIIAS

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Bruce Momjian
bruce@momjian.us
In reply to: Sergey N. Yatskevich (#1)
Re: [BUGS] Bug in byteaout code in all PostgreSQL versions

Joe Conway has an updated version of this he will be applying shortly.
Thanks.

Joe, please make sure you CC this person once your patch is applied.

---------------------------------------------------------------------------

Sergey N. Yatskevich wrote:

Hello!

bytea-test.cxx -- contains detailed description of the bug and test
plan and code.

varlena.c.diff -- patch for PostgreSQL 7.5devel
src/backend/utils/adt/varlena.c#byteaout
fe-exec.c.diff -- patch (optional) for PostgreSQL 7.5devel
src/interface/libpq/fe-exec.c#PQescapeBytea

test.data -- contains test data :-))

--
Sergey N. Yatskevich <syatskevich@n21lab.gosniias.msk.ru>
GosNIIAS

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Joe Conway
mail@joeconway.com
In reply to: Bruce Momjian (#3)
Re: [BUGS] Bug in byteaout code in all PostgreSQL versions

Bruce Momjian wrote:

Joe Conway has an updated version of this he will be applying shortly.
Thanks.

Joe, please make sure you CC this person once your patch is applied.

I just applied the attached patch to cvs head, and equivalent ones on
the 7.3 and 7.4 stable branches. I also attached the output of Sergey's
test program with the patch applied. Thanks for the nice,
self-contained, test case!

Joe

Attachments:

bytea-escaping-bugfix.1.patchtext/plain; name=bytea-escaping-bugfix.1.patchDownload+45-33
bytea-test.outputtext/plain; name=bytea-test.outputDownload