aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgconf-comp.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-01-23 13:24:22 +0000
committerJustus Winter <[email protected]>2017-01-24 14:44:16 +0000
commitb0348fdb26637b0bcbd68a96c1746a1613b309af (patch)
tree2c7205746c2a792299d3548bdeed2b859e088b2f /tools/gpgconf-comp.c
parenttools: Fix memory leak. (diff)
downloadgnupg-b0348fdb26637b0bcbd68a96c1746a1613b309af.tar.gz
gnupg-b0348fdb26637b0bcbd68a96c1746a1613b309af.zip
tools: Improve error handling.
* tools/gpgconf-comp.c (gp_component_change_options): Improve error handling when reading from stdin. -- Previously, errors encountered while reading the configuration changes were ignored. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tools/gpgconf-comp.c')
-rw-r--r--tools/gpgconf-comp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 85eb80ab5..180fd65c2 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -3328,6 +3328,8 @@ gc_component_change_options (int component, estream_t in, estream_t out,
change_one_value (option, runtime, flags, new_value, 0);
}
+ if (length < 0 || gpgrt_ferror (in))
+ gc_error (1, errno, "error reading stream 'in'");
}
/* Now that we have collected and locally verified the changes,