Home GnuPG

Qt: Do not use temporary reference to utf8 pin
f143d216eff4Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Qt: Do not use temporary reference to utf8 pin

* qt/main.cpp (qt_cmd_handler): Keep utf8 pin byte array.

The pin pointer was invalid after the UTF8 conversion
as the converted byte array only was temporary in that
call and the data pointer becomes invalid after it's
destruction.

Commit message amended by Andre Heinecke. The original
commit message was:

const char* does not keep the temporary string returned
from toUtf8() active, since it doesn't keep the reference counter
set. So you usually just copy out garbage instead of the
pin that was entered. Just keep the QByteArray which keeps
the reference active.

Details

Provenance
dmllrAuthored on Oct 21 2015, 2:41 PM
aheineckeCommitted on Oct 22 2015, 10:40 AM
Parents
rP48ab8cdccff4: Qt: Fix assignment of have_qt5_libs variable.
Branches
Unknown
Tags
Unknown