wohaph / keyczar

Automatically exported from code.google.com/p/keyczar
0 stars 0 forks source link

Suspicious construct in ScopedBIO #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The destroyer for a BIO in ScopedBIO calls BIO_free_all
http://code.google.com/p/keyczar/source/browse/trunk/cpp/src/keyczar/openssl/uti
l.h#50

this means that constructing a stack of ScopedBIOs will cause some of the BIOs 
to be double-freed.  No one currently does this, but it seems like we could do 
better with plain old BIO_free

Original issue reported on code.google.com by rochb...@chromium.org on 20 Sep 2010 at 6:05

GoogleCodeExporter commented 9 years ago
You're right, I've replaced this call by BIO_vfree().

http://code.google.com/p/keyczar/source/detail?r=472

Thanks for your report.

Original comment by sebastien.martini on 22 Sep 2010 at 10:13