The Samba-Bugzilla – Attachment 3092 Details for
Bug 5189
smbc_listxattr_ctx always returns 4 rather than 373 or so
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix bug, use sizeof(supported_old), etc.
samba.patch (text/plain), 1.25 KB, created by
Jack Schmidt
on 2008-01-11 16:58:03 UTC
(
hide
)
Description:
Patch to fix bug, use sizeof(supported_old), etc.
Filename:
MIME Type:
Creator:
Jack Schmidt
Created:
2008-01-11 16:58:03 UTC
Size:
1.25 KB
patch
obsolete
>--- samba-3.0.28/source/libsmb/libsmbclient.c 2007-11-14 22:15:03.000000000 -0500 >+++ samba-3.0.28/source/libsmb/libsmbclient.c 2008-01-11 17:43:45.000000000 -0500 >@@ -5877,6 +5877,7 @@ > * the complete set of attribute names, always, rather than only those > * attribute names which actually exist for a file. Hmmm... > */ >+ size_t retsize; > const char supported_old[] = > "system.*\0" > "system.*+\0" >@@ -5920,22 +5921,24 @@ > > if (context->internal->_full_time_names) { > supported = supported_new; >+ retsize = sizeof(supported_new); > } else { > supported = supported_old; >+ retsize = sizeof(supported_old); > } > > if (size == 0) { >- return sizeof(supported); >+ return retsize; > } > >- if (sizeof(supported) > size) { >+ if (retsize > size) { > errno = ERANGE; > return -1; > } > > /* this can't be strcpy() because there are embedded null characters */ >- memcpy(list, supported, sizeof(supported)); >- return sizeof(supported); >+ memcpy(list, supported, retsize); >+ return retsize; > } > >
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 Raw
Actions:
View
Attachments on
bug 5189
: 3092