• Werner Koch's avatar
    common: Use new function to print status strings. · f19ff78f
    Werner Koch authored
    * 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
    f19ff78f
Name
Last commit
Last update
..
ChangeLog-2011 Loading commit data...
Makefile.am Loading commit data...
apdu.c Loading commit data...
apdu.h Loading commit data...
app-common.h Loading commit data...
app-dinsig.c Loading commit data...
app-geldkarte.c Loading commit data...
app-help.c Loading commit data...
app-nks.c Loading commit data...
app-openpgp.c Loading commit data...
app-p15.c Loading commit data...
app-sc-hsm.c Loading commit data...
app.c Loading commit data...
atr.c Loading commit data...
atr.h Loading commit data...
ccid-driver.c Loading commit data...
ccid-driver.h Loading commit data...
command.c Loading commit data...
iso7816.c Loading commit data...
iso7816.h Loading commit data...
scdaemon-w32info.rc Loading commit data...
scdaemon.c Loading commit data...
scdaemon.h Loading commit data...