diff options
author | 2018-10-14 14:30:06 +0200 | |
---|---|---|
committer | 2018-10-14 14:30:06 +0200 | |
commit | dbb169bf1588b524bde8a2b7bfb83d5e2bb9b506 (patch) | |
tree | 13c3ce670e533bfeebbd8509fab9145a69e03282 /swaylock | |
parent | Remove unnecessary comment (diff) | |
parent | swaylock: fix clear_password_buffer (diff) | |
download | sway-dbb169bf1588b524bde8a2b7bfb83d5e2bb9b506.tar.gz sway-dbb169bf1588b524bde8a2b7bfb83d5e2bb9b506.tar.zst sway-dbb169bf1588b524bde8a2b7bfb83d5e2bb9b506.zip |
Merge pull request #2829 from espkk/master
Fix clear_password_buffer
Diffstat (limited to 'swaylock')
-rw-r--r-- | swaylock/password.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swaylock/password.c b/swaylock/password.c index 6a956bcb..50b81f6b 100644 --- a/swaylock/password.c +++ b/swaylock/password.c | |||
@@ -14,7 +14,7 @@ void clear_password_buffer(struct swaylock_password *pw) { | |||
14 | // Use volatile keyword so so compiler can't optimize this out. | 14 | // Use volatile keyword so so compiler can't optimize this out. |
15 | volatile char *buffer = pw->buffer; | 15 | volatile char *buffer = pw->buffer; |
16 | volatile char zero = '\0'; | 16 | volatile char zero = '\0'; |
17 | for (size_t i = 0; i < sizeof(buffer); ++i) { | 17 | for (size_t i = 0; i < sizeof(pw->buffer); ++i) { |
18 | buffer[i] = zero; | 18 | buffer[i] = zero; |
19 | } | 19 | } |
20 | pw->len = 0; | 20 | pw->len = 0; |