aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2022-05-25 07:00:10 +0000
committerWerner Koch <[email protected]>2023-06-16 07:57:14 +0000
commit5ac7e6ba19fa5ed472b50c1b12ba7cf94015c734 (patch)
tree6b7da4de98cda14fd2b8adcff753a91cc6ad4037
parentserver: Wipe out the memory used by assuan_inquire if CONFIDENTIAL. (diff)
downloadlibassuan-5ac7e6ba19fa5ed472b50c1b12ba7cf94015c734.tar.gz
libassuan-5ac7e6ba19fa5ed472b50c1b12ba7cf94015c734.zip
server,client: Wipe the outbound buffer when CONFIDENTIAL.
* src/assuan-buffer.c (assuan_send_data): Wipe the buffer. -- GnuPG-bug-id: 5977 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--src/assuan-buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c
index be87280..f131a8d 100644
--- a/src/assuan-buffer.c
+++ b/src/assuan-buffer.c
@@ -499,6 +499,8 @@ assuan_send_data (assuan_context_t ctx, const void *buffer, size_t length)
if (!buffer)
{ /* flush what we have */
_assuan_cookie_write_flush (ctx);
+ if (ctx->flags.confidential)
+ wipememory (ctx->outbound.data.line, LINELENGTH);
if (ctx->outbound.data.error)
return ctx->outbound.data.error;
if (!ctx->is_server)