mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 18:13:49 +01:00
sys/net/credman: fix insecure memory wiping
This commit is contained in:
parent
0f27ce4ad8
commit
a00fb233dc
@ -16,9 +16,10 @@
|
|||||||
* @author Aiman Ismail <muhammadaimanbin.ismail@haw-hamburg.de>
|
* @author Aiman Ismail <muhammadaimanbin.ismail@haw-hamburg.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "net/credman.h"
|
|
||||||
#include "mutex.h"
|
|
||||||
#include "kernel_defines.h"
|
#include "kernel_defines.h"
|
||||||
|
#include "mutex.h"
|
||||||
|
#include "net/credman.h"
|
||||||
|
#include "string_utils.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -395,7 +396,7 @@ void credman_delete(credman_tag_t tag, credman_type_t type)
|
|||||||
mutex_lock(&_mutex);
|
mutex_lock(&_mutex);
|
||||||
int pos = _find_credential_pos(tag, type, NULL);
|
int pos = _find_credential_pos(tag, type, NULL);
|
||||||
if (pos >= 0) {
|
if (pos >= 0) {
|
||||||
memset(&credentials[pos], 0, sizeof(credman_credential_t));
|
explicit_bzero(&credentials[pos], sizeof(credman_credential_t));
|
||||||
used--;
|
used--;
|
||||||
}
|
}
|
||||||
mutex_unlock(&_mutex);
|
mutex_unlock(&_mutex);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user