Verified Commit 089db785 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Fix win_get_user_name

If GetUserName is used and not GetUserNameEx the size paremter
is one wchar_t too large and includes another \O. So it's better
to use fromWcharArray without size so that it only uses the
terminated string. If the zero is included in the GnuPG
key params it aborts parsing at that point and creates
a key without subkeys.
parent c31c671f
......@@ -39,7 +39,7 @@ QString win_get_user_name(EXTENDED_NAME_FORMAT what)
delete[] buf;
return ret;
}
ret = QString::fromWCharArray (buf, nSize);
ret = QString::fromWCharArray (buf);
delete[] buf;
return ret.trimmed();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment