PQescapeString handling of \0

From: Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: PQescapeString handling of \0
Date: 2003-09-29 16:49:26
Message-ID: 200309291949.26188.igor@carcass.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Attachment Content-Type Size
fe-exec_pqescapestring.diff text/x-diff 297 bytes

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-09-29 18:22:01 Re: PQescapeString handling of \0
Previous Message alexander riachtchenko 2003-09-29 02:29:10 unsubscribe