gnupg/scd
Werner Koch f19ff78f0f
common: Use new function to print status strings.
* common/asshelp2.c (vprint_assuan_status_strings): New.
(print_assuan_status_strings): New.
* agent/command.c (agent_write_status): Replace by call to new
function.
* dirmngr/server.c (dirmngr_status): Ditto.
* g13/server.c (g13_status): Ditto.
* g13/sh-cmd.c (g13_status): Ditto.
* sm/server.c (gpgsm_status2): Ditto.
* scd/command.c (send_status_info): Bump up N.
--

This fixes a potential overflow if LFs are passed to the status
string functions.  This is actually not the case and would be wrong
because neither the truncating in libassuan or our escaping is not the
Right Thing.  In any case the functions need to be more robust and
comply to the promised interface.  Thus the code has been factored out
to a helper function and N has been bumped up correctly and checked in
all cases.

For some uses this changes the behaviour in the error case (i.e. CR or
LF passed): It will now always be C-escaped and not passed to
libassuan which would truncate the line at the first LF.

Reported-by: private_pers
2018-02-14 12:21:44 +01:00
..
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
Makefile.am Remove -I option to common. 2017-03-07 20:25:54 +09:00
apdu.c scd: Enable card removal check after select_application. 2017-11-21 12:19:15 +09:00
apdu.h scd: Fix use case of PC/SC. 2017-02-13 11:09:13 +09:00
app-common.h scd: Fix RESET command handling (more). 2017-02-17 11:50:40 +09:00
app-dinsig.c Remove -I option to common. 2017-03-07 20:25:54 +09:00
app-geldkarte.c Remove -I option to common. 2017-03-07 20:25:54 +09:00
app-help.c Remove -I option to common. 2017-03-07 20:25:54 +09:00
app-nks.c Remove -I option to common. 2017-03-07 20:25:54 +09:00
app-openpgp.c scd: Improve KDF-DO support 2018-02-13 09:28:13 +09:00
app-p15.c scd: Relax a condition for p15 driver. 2017-04-10 13:18:30 +09:00
app-sc-hsm.c Remove -I option to common. 2017-03-07 20:25:54 +09:00
app.c scd: Enable card removal check after select_application. 2017-11-21 12:19:15 +09:00
atr.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
atr.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ccid-driver.c scd: Fix for inactive card at start by internal CCID driver. 2017-12-27 17:20:03 +09:00
ccid-driver.h scd: Fix GetSlotStatus. 2017-01-30 09:32:03 +09:00
command.c common: Use new function to print status strings. 2018-02-14 12:21:44 +01:00
iso7816.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
iso7816.h scd: Fix API of select_file/_path. 2017-03-06 13:39:46 +09:00
scdaemon-w32info.rc w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
scdaemon.c scd: Use pipe to kick the loop on NetBSD. 2018-02-07 12:43:07 +09:00
scdaemon.h scd: Fix regression tracking the connection count. 2017-02-01 08:58:01 +09:00