[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kdiff3: FTBFS on hurd-i386 (for review)



On 2014-09-24 19:11, Philipp A. Hartmann wrote:
I would probably do it like this (untested):

    const char *path =
        QFile::encodeName(fi.absoluteFilePath()).constData();

QFile::encodeName returns a temporary QByteArray, and getting a
pointer to its internal char* will cause it to be a dangling pointer.

  const QByteArray path = QFile::encodeName(fi.absoluteFilePath());

and then use path.constData() whenever needed.

        std::vector<char> s(sb.st_size + 1);

Please use QByteArray instead.

--
Pino Toscano


Reply to: