summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index c59fe5c34d..fead58faae 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1387,6 +1387,10 @@ ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t si
*/
retval = extattr_get_file(path, attrnamespace, attrname, NULL, 0);
+ if (retval == -1) {
+ return -1;
+ }
+
if(retval > size) {
errno = ERANGE;
return -1;
@@ -1422,6 +1426,10 @@ ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t s
retval = extattr_get_link(path, attrnamespace, attrname, NULL, 0);
+ if (retval == -1) {
+ return -1;
+ }
+
if(retval > size) {
errno = ERANGE;
return -1;
@@ -1457,6 +1465,10 @@ ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size)
retval = extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0);
+ if (retval == -1) {
+ return -1;
+ }
+
if(retval > size) {
errno = ERANGE;
return -1;