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

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 (view raw or flat)
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: fe-exec_pqescapestring.diff
Description: text/x-diff (297 bytes)

Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 2003-09-29 18:22:01
Subject: Re: PQescapeString handling of \0
Previous:From: alexander riachtchenkoDate: 2003-09-29 02:29:10
Subject: unsubscribe

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