Re: pgcrypto: fix memory leak in openssl.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marko Kreen" <markokr(at)gmail(dot)com>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, "Daniel Blaisdell" <lunk(dot)djedi(at)gmail(dot)com>, "Michael Fuhr" <mike(at)fuhr(dot)org>
Subject: Re: pgcrypto: fix memory leak in openssl.c
Date: 2006-02-20 15:05:47
Message-ID: 25970.1140447947@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Marko Kreen" <markokr(at)gmail(dot)com> writes:
> On 2/18/06, Marko Kreen <markokr(at)gmail(dot)com> wrote:
>> pgcrypto crypt()/md5 and hmac() leak memory when compiled against
>> OpenSSL as openssl.c digest ->reset will do two DigestInit calls
>> against a context. This happened to work with OpenSSL 0.9.6
>> but not with 0.9.7+.

> Ugh, seems I read the old code slightly wrong. The leak happens
> also with regular digest(), although it will leak only 1 context
> instance, not the 1000+ as the crypt-md5 does.

I'm confused --- does this mean that the patch you sent recently
needs further work?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-02-20 15:13:39 Re: [PATCH] WIP: Create shell-types explicitly
Previous Message Marko Kreen 2006-02-20 13:06:34 Re: pgcrypto: fix memory leak in openssl.c