diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 21:21:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 21:21:03 +0000 |
commit | 69349561bf941cc67f1afcbbc115af8dbd624f94 (patch) | |
tree | 49d5db9fac516d5de488244d4cffd2e9d74220e7 /g10/plaintext.c | |
parent | Adding debian version 2.2.40-3. (diff) | |
download | gnupg2-69349561bf941cc67f1afcbbc115af8dbd624f94.tar.xz gnupg2-69349561bf941cc67f1afcbbc115af8dbd624f94.zip |
Merging upstream version 2.2.43.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r-- | g10/plaintext.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c index 3bc8696..10d567a 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -584,11 +584,16 @@ do_hash (gcry_md_hd_t md, gcry_md_hd_t md2, IOBUF fp, int textmode) } else { - while ((c = iobuf_get (fp)) != -1) + byte *buffer = xmalloc (32768); + int ret; + + while ((ret = iobuf_read (fp, buffer, 32768)) != -1) { if (md) - gcry_md_putc (md, c); + gcry_md_write (md, buffer, ret); } + + xfree (buffer); } } |