jtamate added inline comments. INLINE COMMENTS
> bruns wrote in file.cpp:864 > This is broken (although not new). > > `buff.st_size` is the size of the target name **without** null byte. > readlink(..., .., bufferSize) thus will typically read exactly bufferSize > bytes, thus n == bufferSize > As a result, the 'good' case in the branches below will not pass, and a > resize(bufferSize *= 2) and another readlink will happen. According to the man page (2+3), readlink() //does not append a null byte to buf//. It will (silently) truncate the contents (to a length of bufsiz characters), in case the buffer is too small to hold all of the contents. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D13898 To: jtamate, dfaure, #frameworks Cc: bruns, kde-frameworks-devel, michaelh, ngraham