Hi,
>From the code:
http://cvs.openssl.org/fileview?f=openssl/engines/e_sureware.c&v=1.3.2.8
I think the the null check is unneccesary in this snippet since it is
already dereferenced prior to that.
bn_expand2(r,m->top);
if (r && r->dmax==m->top)
If you would really like to check against NULL, you can do it
beforehand, but I had not more time to look into the details how it
expects the arguments whether or not it should handle the null
argument internally or what the purpose is in general. There are no
function documentations, thus I would like to let you decide that part
for now...
Thank you in advance!
Best Regards,
Laszlo Papp
--- ../tmp/openssl-SNAP-20110407/engines/e_sureware.c 2009-09-24
03:00:35.000000000 +0300
+++ ./engines/e_sureware.c 2011-04-08 12:20:01.393333452 +0300
@@ -1034,7 +1034,7 @@
else
{
bn_expand2(r,m->top);
- if (r && r->dmax==m->top)
+ if (r->dmax==m->top)
{
/* do it*/
ret=p_surewarehk_Mod_Exp(msg,