Project

General

Profile

Bug #6106

attr_to_xattr_view should return XATTR_VIEW_INVALID when encountering invalid attr

Added by Richard PALO over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2015-08-08
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

patch says it all

diff --git a/usr/src/common/xattr/xattr_common.c b/usr/src/common/xattr/xattr_common.c
index a40cd03..e9b511b 100644
--- a/usr/src/common/xattr/xattr_common.c
+++ b/usr/src/common/xattr/xattr_common.c
@@ -115,7 +115,7 @@ xattr_view_t
 attr_to_xattr_view(f_attr_t attr)
 {
        if (attr >= F_ATTR_ALL || attr < 0)
-               return (NULL);
+               return (XATTR_VIEW_INVALID);

        return (xattrs[attr].x_xattr_view);
 }

Also available in: Atom PDF