mirror of
https://github.com/swaywm/sway.git
synced 2025-01-01 18:06:47 +01:00
commit
dbb169bf15
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ void clear_password_buffer(struct swaylock_password *pw) {
|
||||||
// Use volatile keyword so so compiler can't optimize this out.
|
// Use volatile keyword so so compiler can't optimize this out.
|
||||||
volatile char *buffer = pw->buffer;
|
volatile char *buffer = pw->buffer;
|
||||||
volatile char zero = '\0';
|
volatile char zero = '\0';
|
||||||
for (size_t i = 0; i < sizeof(buffer); ++i) {
|
for (size_t i = 0; i < sizeof(pw->buffer); ++i) {
|
||||||
buffer[i] = zero;
|
buffer[i] = zero;
|
||||||
}
|
}
|
||||||
pw->len = 0;
|
pw->len = 0;
|
||||||
|
|
Loading…
Reference in a new issue