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: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

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)


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-2018 The PostgreSQL Global Development Group