PQescapeString handling of \0 - Mailing list pgsql-interfaces

From Igor Shevchenko
Subject PQescapeString handling of \0
Date
Msg-id 200309291949.26188.igor@carcass.ath.cx
Whole thread Raw
Responses Re: PQescapeString handling of \0  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PQescapeString handling of \0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
Hi.

Here's a patch which makes PQescapeString stop escaping when \0 is seen.
Currently. if somebody passes a string with embedded \0 (for example, perl 
allows \0s in it's scalars and DBD::Pg does no checks), PQescapeString will 
return an invalid (bigger) length for \0-terminated string.

-- 
Best regards,
Igor Shevchenko

pgsql-interfaces by date:

Previous
From: David Schweikert
Date:
Subject: ANNOUNCE: Gedafe 1.2.0
Next
From: Tom Lane
Date:
Subject: Re: PQescapeString handling of \0