When a helper is called by CB_HANDLER, the callback function is not checked for NULL, but it is checked before being called directly:
#define CB_HANDLER(name) \
case CB_TYPE_##name : \
{ \
const struct name ## _callback *cb = &callback->callback.name ;\
if (cb && cb->helper) { \
CKINT(cb->helper(processdata, parsed_flags, testvector,\
testresults, cb->fn, cb->vector)); \
} else if (cb && cb->fn) { \
CKINT(cb->fn(cb->vector, parsed_flags));
I set some ecdsa_backend callbacks to NULL because I don't build the openssl code used by the callbacks. This caused a crash when testing vectors instead of returning EOPNOTSUPP.
Is this expected behavior? If not, I attached a simple patch I used to fix this on my end.
parser_common.patch
Thanks,
Reid
When a helper is called by
CB_HANDLER, the callback function is not checked forNULL, but it is checked before being called directly:I set some
ecdsa_backendcallbacks toNULLbecause I don't build the openssl code used by the callbacks. This caused a crash when testing vectors instead of returningEOPNOTSUPP.Is this expected behavior? If not, I attached a simple patch I used to fix this on my end.
parser_common.patch
Thanks,
Reid