common: Let format_text return an error.
authorWerner Koch <wk@gnupg.org>
Mon, 15 May 2017 07:58:27 +0000 (09:58 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 15 May 2017 07:58:27 +0000 (09:58 +0200)
commit00b7767bc6fe309aa20375c859ebf708cfc7b9ea
tree95049d0230b05b0beb4520e166a450bff9dd6b86
parentbc01d62dc5d520e138499df5d80fb50f9e87e3e8
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 <wk@gnupg.org>
common/stringhelp.c
common/t-stringhelp.c
g10/gpgcompose.c
g10/tofu.c