diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-08 21:08:54 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-08 21:08:54 -0400 |
commit | ddea446252fad05bc28ede2ee2043f8d96addd65 (patch) | |
tree | 53760afaab38c24bebb50d32ca022c9d3b89acca /src | |
parent | 9d4e7d1380927da67c25b57344f50ea1692aad96 (diff) |
journal: assert gcry_mpi_scan succeeded
It might be nicer to propagate the error to the caller, but that'd
be a bigger refactoring. This shouldn't really fail, so just add
an assert.
CID #1349697.
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/fsprg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/fsprg.c b/src/journal/fsprg.c index 8956eb1d58..612b10f3a9 100644 --- a/src/journal/fsprg.c +++ b/src/journal/fsprg.c @@ -58,7 +58,7 @@ static gcry_mpi_t mpi_import(const void *buf, size_t buflen) { gcry_mpi_t h; unsigned len; - gcry_mpi_scan(&h, GCRYMPI_FMT_USG, buf, buflen, NULL); + assert_se(gcry_mpi_scan(&h, GCRYMPI_FMT_USG, buf, buflen, NULL) == 0); len = (gcry_mpi_get_nbits(h) + 7) / 8; assert(len <= buflen); assert(gcry_mpi_cmp_ui(h, 0) >= 0); |