[OpenSER-Devel] postgresql and escaping

Henning Westerholt henning.westerholt at 1und1.de
Mon Feb 11 14:52:31 UTC 2008


On Monday 04 February 2008, Klaus Darilion wrote:
> [..]
> >> This means we reserve l*2+3 bytes for the escaped string, but as
> >> escaping of special characters is done by 3digts octal representation,
> >> e.g. CR will be converted to \015, this buffer can be too small.
> >>
> >> I suggest to make the length check after PQescapeByteaConn and check if
> >> tmp_len < _len.

Hi Klaus,

i've made the fix you've suggested. I've also opened a feature request for the 
escaping improvements and the possible performance optimizations in the 
db_postgres module on the tracker. 

The reason that i don't want to do this changes by myself is that i don't use 
postgres at all at the moment and thus i don't have a good test environment 
to validate my changes for this library available.

Cheers,

Henning



More information about the Devel mailing list