diff options
author | Werner Koch <[email protected]> | 2017-05-15 07:58:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-05-15 07:58:27 +0000 |
commit | 00b7767bc6fe309aa20375c859ebf708cfc7b9ea (patch) | |
tree | 95049d0230b05b0beb4520e166a450bff9dd6b86 /g10/gpgcompose.c | |
parent | tests: Also run all OpenPGP tests using keyrings. (diff) | |
download | gnupg-00b7767bc6fe309aa20375c859ebf708cfc7b9ea.tar.gz gnupg-00b7767bc6fe309aa20375c859ebf708cfc7b9ea.zip |
common: Let format_text return an error.
* common/stringhelp.c (format_text): Return NULL on error.
* common/t-stringhelp.c (test_format_text): Adjust for change.
* g10/gpgcompose.c (show_help): Abort on out of core.
* g10/tofu.c (ask_about_binding): Abort on format_text error.
(show_statistics): Ditto.
(show_warning): Ditto.
--
For better re-usability function in common/ shot better not use
xmalloc functions.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/gpgcompose.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/gpgcompose.c b/g10/gpgcompose.c index 071d6bf45..4a2cb818f 100644 --- a/g10/gpgcompose.c +++ b/g10/gpgcompose.c @@ -306,6 +306,8 @@ show_help (struct option options[]) if (! option) space = 72; formatted = format_text (tmp, space, space + 4); + if (!format_text) + abort (); if (tmp != help) xfree (tmp); |