4
0
mirror of https://github.com/QuasarApp/qca.git synced 2025-05-09 17:29:33 +00:00

Don't store the char * of a bytearray.toLatin1().data()

It's dangling memory
This commit is contained in:
Albert Astals Cid 2020-01-23 17:44:42 +01:00
parent d3f8ea684e
commit d3fd2d9a10

@ -309,7 +309,8 @@ private:
return false;
if(!ext_authid.isEmpty()) {
const char *authid = ext_authid.toLatin1().data();
const QByteArray ext_authidBA = ext_authid.toLatin1();
const char *authid = ext_authidBA.data();
sasl_ssf_t ssf = ext_ssf;
r = sasl_setprop(con, SASL_SSF_EXTERNAL, &ssf);
if(r != SASL_OK)