All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
To: ell@lists.01.org
Subject: [PATCH 3/4] settings: Clear values in unescape_value on error
Date: Tue, 19 Mar 2019 01:48:42 +0100	[thread overview]
Message-ID: <20190319004843.13451-3-andrew.zaborowski@intel.com> (raw)
In-Reply-To: <20190319004843.13451-1-andrew.zaborowski@intel.com>

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

Clear the beginnings of strings loaded from file that later failed
parsing.
---
 ell/settings.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ell/settings.c b/ell/settings.c
index 98823a2..3b79431 100644
--- a/ell/settings.c
+++ b/ell/settings.c
@@ -139,6 +139,7 @@ static char *unescape_value(const char *value)
 			*n = '\\';
 			break;
 		default:
+			explicit_bzero(ret, n - ret);
 			l_free(ret);
 			return NULL;
 		}
-- 
2.19.1


  parent reply	other threads:[~2019-03-19  0:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  0:48 [PATCH 1/4] ecc: Clear point coordinates, use explicit_bzero Andrew Zaborowski
2019-03-19  0:48 ` [PATCH 2/4] pkcs5: Memzero copies of secrets Andrew Zaborowski
2019-03-19  0:48 ` Andrew Zaborowski [this message]
2019-03-19  0:48 ` [PATCH 4/4] all: Replace uses of memset with explicit_bzero Andrew Zaborowski
2019-03-19 19:19 ` [PATCH 1/4] ecc: Clear point coordinates, use explicit_bzero Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190319004843.13451-3-andrew.zaborowski@intel.com \
    --to=andrew.zaborowski@intel.com \
    --cc=ell@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.