|
From: | Paul Eggert |
Subject: | Re: [PROPOSED 4/4] explicit_bzero: implement via memset_explicit |
Date: | Mon, 28 Nov 2022 22:06:21 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
I don't understand the purpose of this line: memset (checkbuf, i, SECRET_SIZE); Wouldn't it be better to have memcpy (stbuf, SECRET, SECRET_SIZE); instead?
I added the latter call but kept the former, as the idea was to test that memset_explicit (b, i, s) sets each of b[0]...b[s - 1] to i even when i is nonzero.
[Prev in Thread] | Current Thread | [Next in Thread] |