diff --git a/sm/t-minip12.c b/sm/t-minip12.c index 97d58d530..c9adcede6 100644 --- a/sm/t-minip12.c +++ b/sm/t-minip12.c @@ -539,7 +539,10 @@ run_one_test (const char *name, const char *desc, const char *pass, } } - resulthash = hash_buffer (tmpstring, strlen (tmpstring)); + /* Hash only if we have at least one parameter; i.e. the curve + * alone is not sufficient. */ + if (result[0]) + resulthash = hash_buffer (tmpstring, strlen (tmpstring)); xfree (tmpstring); }