Don't access temporary data from QStringBuilder
ClosedPublic

Authored by ervin on Jul 24 2017, 8:57 AM.

Details

Summary

This was spotted by ASAN, we forgot to force the conversion from
QStringBuilder to QString on fullText.

Diff Detail

Repository
R4 Zanshin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ervin created this revision.Jul 24 2017, 8:57 AM
dfaure accepted this revision.Jul 24 2017, 9:50 AM

Tricky stuff, I guess QStringBuilder "moves" the data to QString upon conversion, and we end up doing that twice...

IMHO this is a case where const QString fullText = ... is easier, but OK :)

This revision is now accepted and ready to land.Jul 24 2017, 9:50 AM
This revision was automatically updated to reflect the committed changes.