Hi OpenSSL Devs,
I have found the following bug in crypto/stack/safestack.h:
The macro SKM_ASN1_SET_OF_d2i (crypto/stack/safestack.h: 181ff) expects a
pointer to a STACK_OF(type) as the second argument. A pointer to a pointer
to a STACK_OF(type) would be appropriate though. Consequently, the compiler
reports an error if you call one of the d2i_ASN1_SET_OF_<TYPE> macros with
a pointer to a pointer to a STACK_OF(type).
The applied patch fixes this bug.
Cheers,
Stefan Birrer
--
AdNovum Informatik AG
Stefan Birrer, Software Engineer
Dipl. Informatik-Ing. ETH
Roentgenstrasse 22, CH-8005 Zurich
mailto:[email protected]
phone: +41 44 272 6111, fax: +41 44 272 6312
http://www.adnovum.ch
AdNovum Offices: Bern, Budapest, Singapore, Zurich (HQ)
diff -crB openssl-1.0.0b/crypto/stack/safestack.h
openssl-1.0.0b_patched/crypto/stack/safestack.h
*** openssl-1.0.0b/crypto/stack/safestack.h Mon Nov 15 15:44:50 2010
--- openssl-1.0.0b_patched/crypto/stack/safestack.h Thu Dec 2 15:46:02 2010
***************
*** 179,185 ****
sk_is_sorted(CHECKED_STACK_OF(type, st))
#define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func,
ex_tag, ex_class) \
! (STACK_OF(type) *)d2i_ASN1_SET((STACK_OF(OPENSSL_BLOCK)
**)CHECKED_STACK_OF(type, st), \
pp, length, \
CHECKED_D2I_OF(type, d2i_func), \
CHECKED_SK_FREE_FUNC(type, free_func), \
--- 179,186 ----
sk_is_sorted(CHECKED_STACK_OF(type, st))
#define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func,
ex_tag, ex_class) \
! (STACK_OF(type) *)d2i_ASN1_SET( \
! (STACK_OF(OPENSSL_BLOCK)
**)CHECKED_PTR_OF(STACK_OF(type)*, CHECKED_STACK_OF(type, st)), \
pp, length, \
CHECKED_D2I_OF(type, d2i_func), \
CHECKED_SK_FREE_FUNC(type, free_func), \