our own buffer for ObfuscatedPasswd, we need to take it (so that it's
set to zero) to prevent CharArray destructor from trying to free it.
Also, memset the fixed length of the data variable, rather than rely
on strlen, since the string might not be null terminated.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3288
3789f03b-4d11-0410-bbf8-
ca57d06f2519
obfPwd.buf = data;
obfPwd.length = datalen;
PlainPasswd passwd(obfPwd);
+ obfPwd.takeBuf();
*password = strDup(passwd.buf);
- memset(data, 0, strlen(data));
+ memset(data, 0, sizeof(data));
}
}
}