aboutsummaryrefslogtreecommitdiffstats
path: root/tests/t-logging.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-05-14tests: Fix a memory leak.NIIBE Yutaka1-0/+1
* tests/t-logging.c (check_log_info): Free LOGBUF. -- GnuPG-bug-id: 4498 Signed-off-by: NIIBE Yutaka <[email protected]>
2018-12-06logging: Escape controls in string arguments of log_ functions.Werner Koch1-0/+32
* src/logging.c (struct fmt_string_filter_s): New. (fmt_string_filter): New. (_gpgrt_logv_internal): Use the filter. -- This change has two advantages: a) There is no more need to first escape string arguments before passing them to a log function and b) you can't forget to do the escaping and thus attacks using diagnostic output to trick out users won't work. The drawback is that you see \n instead of a real LF and under Windows the backslash in file names are doubled. Signed-off-by: Werner Koch <[email protected]>
2018-12-05core: Allow logging to an estream.Werner Koch1-0/+217
* src/logging.c (set_file_fd): Add and use new arg 'stream'. (_gpgrt_log_set_sink): Implement setting an estream sink. * tests/t-logging.c: New test. * tests/Makefile.am (TESTS): Add test. Signed-off-by: Werner Koch <[email protected]>