FreeBSD Bugzilla – Attachment 260381 Details for
Bug 286773
Patch for net/rsync to fix the handling of many xattrs on FreeBSD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to enable support for many xattrs on FreeBSD
fix-rsync-xattrs-on-freebsd.patch (text/plain), 905 bytes, created by
Peter Eriksson
on 2025-05-13 13:47:24 UTC
(
hide
)
Description:
Patch to enable support for many xattrs on FreeBSD
Filename:
MIME Type:
Creator:
Peter Eriksson
Created:
2025-05-13 13:47:24 UTC
Size:
905 bytes
patch
obsolete
>diff --git a/lib/sysxattrs.c b/lib/sysxattrs.c >index ca08d131..772f6ae1 100644 >--- a/lib/sysxattrs.c >+++ b/lib/sysxattrs.c >@@ -126,7 +126,12 @@ ssize_t sys_llistxattr(const char *path, char *list, size_t size) > unsigned char keylen; > ssize_t off, len = extattr_list_link(path, EXTATTR_NAMESPACE_USER, list, size); > >- if (len <= 0 || (size_t)len > size) >+ if (size > 0 && (size_t)len >= size) { >+ errno = ERANGE; >+ return -1; >+ } >+ >+ if (len <= 0 || size == 0) > return len; > > /* FreeBSD puts a single-byte length before each string, with no '\0' >@@ -136,7 +141,7 @@ ssize_t sys_llistxattr(const char *path, char *list, size_t size) > for (off = 0; off < len; off += keylen + 1) { > keylen = ((unsigned char*)list)[off]; > if (off + keylen >= len) { >- /* Should be impossible, but kernel bugs happen! */ >+ /* Should be impossible, but bugs happen! */ > errno = EINVAL; > return -1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 286773
:
260381
|
261587
|
261591
|
261593
|
261726