[Pkg-gnupg-commit] [gnupg2] 62/205: common: Check for an error before reading.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 11 08:38:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 8066f8a3470f9d2f3682a28641a7b09eca29a105
Author: Neal H. Walfield <neal at g10code.com>
Date:   Tue Feb 23 21:04:29 2016 +0100

    common: Check for an error before reading.
    
    * common/iobuf.c (iobuf_copy): If DEST has a pending error, don't
    start copying.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
---
 common/iobuf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/iobuf.c b/common/iobuf.c
index 6a9060a..1f2cd3f 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -2237,6 +2237,9 @@ iobuf_copy (iobuf_t dest, iobuf_t source)
   assert (source->use == IOBUF_INPUT || source->use == IOBUF_INPUT_TEMP);
   assert (dest->use == IOBUF_OUTPUT || source->use == IOBUF_OUTPUT_TEMP);
 
+  if (iobuf_error (dest))
+    return -1;
+
   temp = xmalloc (temp_size);
   while (1)
     {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list