summaryrefslogtreecommitdiff
path: root/cipher/md.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-06-23 10:29:08 +0200
committerWerner Koch <wk@gnupg.org>2016-06-25 15:38:49 +0200
commit3f98b1e92d5afd720d7cea5b4e8295c5018bf9ac (patch)
tree39dfcb43f2a1a0fd0604854f0396851f17353f4f /cipher/md.c
parent0f3a069211d8d24a61aa0dc2cc6c4ef04cc4fab7 (diff)
downloadlibgcrypt-3f98b1e92d5afd720d7cea5b4e8295c5018bf9ac.tar.gz
cipher: Improve fatal error message for bad use of gcry_md_read.
* cipher/md.c (md_read): Use _gcry_fatal_error instead of BUG. -- Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/md.c')
-rw-r--r--cipher/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/md.c b/cipher/md.c
index d0ef00fe..344c1f2b 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -847,7 +847,7 @@ md_read( gcry_md_hd_t a, int algo )
return r->spec->read (&r->context.c);
}
}
- BUG();
+ _gcry_fatal_error (GPG_ERR_DIGEST_ALGO, "request algo not in md context");
return NULL;
}