The Samba-Bugzilla – Attachment 6035 Details for
Bug 7755
SMBC_getdents_ctx() ignores struct alignment rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix struct alignment problem on the ARM platform
samba-fix-struct-alignment.patch (text/plain), 831 bytes, created by
Sven Neumann
on 2010-10-26 14:23:17 UTC
(
hide
)
Description:
patch to fix struct alignment problem on the ARM platform
Filename:
MIME Type:
Creator:
Sven Neumann
Created:
2010-10-26 14:23:17 UTC
Size:
831 bytes
patch
obsolete
>diff -Naur samba-orig/source/libsmb/libsmb_dir.c samba-3.3.4/source/libsmb/libsmb_dir.c >--- samba-orig/source3/libsmb/libsmb_dir.c 2009-09-28 11:40:20.000000000 +0200 >+++ samba/source3/libsmb/libsmb_dir.c 2009-09-28 11:36:51.000000000 +0200 >@@ -1081,10 +1081,21 @@ > dirent->namelen + > 1); > >- ndir += reqd; >+ /* have a pointer to the element we will now pad with zeros to have successors aligned */ >+ struct smbc_dirent *currentEntry = ((struct smbc_dirent *) ndir); > >+ ndir += reqd; > rem -= reqd; > >+ /* align the struct for the next entry by appending zeros */ >+ while((rem > 0) && ((int)ndir & (sizeof(void*) - 1))) >+ { >+ *ndir = '\0'; >+ rem--; >+ ndir++; >+ currentEntry->dirlen++; >+ } >+ > dir->dir_next = dirlist = dirlist -> next; > } >
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 7755
: 6035