diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 21:21:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 21:21:05 +0000 |
commit | e7fd617327ed9d30f093a78a016511ab5c984ba4 (patch) | |
tree | bb534b4fd912969c90022ad00726253be891ad8a /g10/plaintext.c | |
parent | Releasing progress-linux version 2.2.40-3~progress7.99u1. (diff) | |
download | gnupg2-e7fd617327ed9d30f093a78a016511ab5c984ba4.tar.xz gnupg2-e7fd617327ed9d30f093a78a016511ab5c984ba4.zip |
Merging upstream version 2.2.43.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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); } } |