mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
sm: Minor robustness fix for a regression test.
* sm/t-minip12.c (run_one_test): Don't hash if we have no parameters at all. -- This fix handles the case that an empty result array is returned by minip12.c
This commit is contained in:
parent
2e7a08a829
commit
d528de9c6e
@ -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);
|
xfree (tmpstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user