Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ee76ac

Browse files
committed
> 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
1 parent904ba3f commit5ee76ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎contrib/pgcrypto/encode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $Id: encode.c,v 1.4 2001/03/22 03:59:10 momjian Exp $
29+
* $Id: encode.c,v 1.5 2001/05/13 02:17:09 momjian Exp $
3030
*/
3131

3232
#include"postgres.h"
@@ -349,7 +349,7 @@ hex_dec_len(uint srclen)
349349
uint
350350
b64_enc_len(uintsrclen)
351351
{
352-
returnsrclen+ (srclen /3)+ (srclen / (76 /2));
352+
returnsrclen+ (srclen+2/3)+ (srclen / (76 /2))+2;
353353
}
354354

355355
uint

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp