D25414: xattr: fix crash on dangling symlinks

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Nov 19 21:16:43 GMT 2019


bruns added inline comments.

INLINE COMMENTS

> xattr_p.h:228
>  
> +    if (size == -1 && errno == ENOENT) {
> +        return UserMetaData::Attribute::None;

if (size < 0) {
    if (errno == E2BIG) {
          return UserMetaData::Attribute::All;
    }
  
    return UserMetaData::Attribute::None;
  }

> xattr_p.h:240
>  
>      if (size > 0 && attributes == UserMetaData::Attribute::Any) {
>          return UserMetaData::Attribute::All;

The `size > 0` can be removed here then.

REPOSITORY
  R286 KFileMetaData

REVISION DETAIL
  https://phabricator.kde.org/D25414

To: iasensio, astippich
Cc: bruns, kde-frameworks-devel, #baloo, hurikhan77, lots0logs, LeGast00n, fbampaloukas, GB_2, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191119/d40bec5c/attachment.html>


More information about the Kde-frameworks-devel mailing list