> I've been experimenting with pgcrypto 0.3 (distributed with

Bruce Momjian <bruce@momjian.us>

Commit: 5ee76ac8c070037b311a960d8231e02f75d0c134
Author: Bruce Momjian <bruce@momjian.us>
Date: 2001-05-13T02:17:09Z
Releases: 7.2.1
> I've been experimenting with pgcrypto 0.3 (distributed with
> Postgres 7.1.0), and I think I've found a bug.
>
> I compiled Pgcrypto with OpenSSL, using gcc 2.95.4 and
> OpenSSL 0.9.6a (the latest Debian 'unstable' packages).

> web=> select encode(digest('blah', 'sha1'), 'base64');
> FATAL 1:  pg_encode: overflow, encode estimate too small
> pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.

> Is this a bug? Can it be fixed?

This is a bug alright.  And a silly one :)

Marko Kreen

Files

PathChange+/−
contrib/pgcrypto/encode.c modified +2 −2