Skip to content
Commit dd7d756f authored by Nikita Melnichenko's avatar Nikita Melnichenko
Browse files

Fixed a crash when browsing dirs with malformed symlinks

Two major changes for improved stability:
* check the status of lstat and show a "broken" file entry
* use new readLinkSafely function which does not consider stat_p.st_size
but gradually increases buffer until the link destination path fits into
the buffer - this helps in case st_size contains garbage
(some network fs don't care about setting the right size)

As a complementary bonus, the change fixes the following warning:
filesystem.cpp:239:35: warning: variable length array ‘buffer’ is used

FIXED: [ 389413 ] Krusader crashes when entering directories with read errors
BUG: 389413
CCBUG: 390994

Differential Revision: https://phabricator.kde.org/D10761
parent ce6372fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment