projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix out of bounds write for zero length buffer in gethostname
[musl]
/
src
/
unistd
/
fchown.c
diff --git
a/src/unistd/fchown.c
b/src/unistd/fchown.c
index
36633b0
..
75075ee
100644
(file)
--- a/
src/unistd/fchown.c
+++ b/
src/unistd/fchown.c
@@
-13,5
+13,10
@@
int fchown(int fd, uid_t uid, gid_t gid)
char buf[15+3*sizeof(int)];
__procfdname(buf, fd);
+#ifdef SYS_chown
return syscall(SYS_chown, buf, uid, gid);
+#else
+ return syscall(SYS_fchownat, AT_FDCWD, buf, uid, gid, 0);
+#endif
+
}