https://bugs.kde.org/show_bug.cgi?id=369275

Andreas Hartmetz <ahartm...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |http://commits.kde.org/kio/
                   |                            |44512b6acbe6bb1c595e330bef7
                   |                            |02a0100d7bd4b

--- Comment #7 from Andreas Hartmetz <ahartm...@gmail.com> ---
Git commit 44512b6acbe6bb1c595e330bef702a0100d7bd4b by Andreas Hartmetz, on
behalf of Taro Yamada.
Committed on 29/10/2016 at 19:13.
Pushed by ahartmetz into branch 'master'.

Sanitize the symlink name buffer size.

Currently, KIO uses lstat to get the buffersize for readlink.
But in certain situations, it returns an inappropriate value.

For example, "/proc/self" or "/sys/bus/cpu/devices/*" returns
its size is 0, and then readlink fails with EINVAL (so the
link won't be shown in KDE applications). TMSU seems to return
the target's actual filesize instead of the link size,
i.e. the length of the target's filename.

This patch limits the initial buffer size to sane values and
expands the buffer when needed. The behavior is similar to
ls, so it should be compatible with all filesystems.

REVIEW: 129259

M  +16   -6    src/ioslaves/file/file.cpp

http://commits.kde.org/kio/44512b6acbe6bb1c595e330bef702a0100d7bd4b

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to