Refactor space allocation for base64 encoding/decoding in pgcrypto.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 1dcfb8da09c47d2a7502d1dfab06c8be4b6cf323
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2014-09-25T13:36:58Z
Releases: 9.5.0
Refactor space allocation for base64 encoding/decoding in pgcrypto.

Instead of trying to accurately calculate the space needed, use a StringInfo
that's enlarged as needed. This is just moving things around currently - the
old code was not wrong - but this is in preparation for a patch that adds
support for extra armor headers, and would make the space calculation more
complicated.

Marko Tiikkaja

Files

PathChange+/−
contrib/pgcrypto/pgp-armor.c modified +34 −43
contrib/pgcrypto/pgp.h modified +4 −4
contrib/pgcrypto/pgp-pgsql.c modified +21 −26