aboutsummaryrefslogtreecommitdiffstats
path: root/g10/seskey.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/seskey.c')
-rw-r--r--g10/seskey.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/seskey.c b/g10/seskey.c
index c41a1455b..e5385af98 100644
--- a/g10/seskey.c
+++ b/g10/seskey.c
@@ -211,9 +211,12 @@ do_encode_md( gcry_md_hd_t md, int algo, size_t len, unsigned nbits,
int i,n;
gcry_mpi_t a;
- if( len + asnlen + 4 > nframe )
- log_bug ("can't encode a %d bit MD into a %d bits frame, algo=%d\n",
- (int)(len*8), (int)nbits, algo);
+ if (len + asnlen + 4 > nframe)
+ {
+ log_error ("can't encode a %d bit MD into a %d bits frame, algo=%d\n",
+ (int)(len*8), (int)nbits, algo);
+ return NULL;
+ }
/* We encode the MD in this way:
*