mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
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@g10code.com>
This commit is contained in:
parent
903466e124
commit
8066f8a347
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user