aboutsummaryrefslogtreecommitdiffstats
path: root/sm/t-minip12.c
diff options
context:
space:
mode:
Diffstat (limited to 'sm/t-minip12.c')
-rw-r--r--sm/t-minip12.c5
1 files changed, 4 insertions, 1 deletions
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);
}