Fix psync_my_pass wipe to use strlen instead of sizeof pointer
In psync_unlink(), putil_wipe(psync_my_pass, sizeof(psync_my_pass)) only wiped 8 bytes (pointer size) instead of the full password string. Changed to strlen(psync_my_pass) and added NULL check. Fixes pcl-zqv.9.1 (partial) GH #276
This commit is contained in:
parent
7175636e49
commit
52c86eae59
|
|
@ -343,8 +343,11 @@ void psync_logout(uint32_t auth_status, int doinvauth) {
|
|||
pcryptofolder_lock();
|
||||
|
||||
pthread_mutex_lock(&psync_my_auth_mutex);
|
||||
putil_wipe(psync_my_pass, sizeof(psync_my_pass));
|
||||
free(psync_my_pass);
|
||||
if (psync_my_pass) {
|
||||
putil_wipe(psync_my_pass, strlen(psync_my_pass));
|
||||
free(psync_my_pass);
|
||||
psync_my_pass = NULL;
|
||||
}
|
||||
pthread_mutex_unlock(&psync_my_auth_mutex);
|
||||
|
||||
pstatus_set(PSTATUS_TYPE_ONLINE, PSTATUS_ONLINE_CONNECTING);
|
||||
|
|
|
|||
Loading…
Reference in New Issue