]> granicus.if.org Git - postgresql/commit
Refactor space allocation for base64 encoding/decoding in pgcrypto.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 25 Sep 2014 13:32:27 +0000 (16:32 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 25 Sep 2014 13:36:58 +0000 (16:36 +0300)
commit1dcfb8da09c47d2a7502d1dfab06c8be4b6cf323
treef99b357968ff2c075d11e00d9912b8101e59f0cc
parent56a312aac8802c2aa01530101d2d19e63568eeda
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
contrib/pgcrypto/pgp-armor.c
contrib/pgcrypto/pgp-pgsql.c
contrib/pgcrypto/pgp.h