diff options
author | Jeremy Allison <jra@samba.org> | 2000-01-28 23:47:31 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-01-28 23:47:31 +0000 |
commit | 40122f6e32627f2afaad0e66eb2f5f6eaa56a4e0 (patch) | |
tree | eb60c89ee960d0f488095134012c05854e269124 | |
parent | 451dcb3351461f52fee619e0d8a1b04d31725181 (diff) | |
download | samba-40122f6e32627f2afaad0e66eb2f5f6eaa56a4e0.tar.gz samba-40122f6e32627f2afaad0e66eb2f5f6eaa56a4e0.tar.bz2 samba-40122f6e32627f2afaad0e66eb2f5f6eaa56a4e0.zip |
Modified auto alignment of ud[] struct on stack to be declared as an
array of pointers. This should cause alignment on a correct boundary..
Spotted by Darren Reed <darrenr@telnetmedia.com>.
Jeremy.
(This used to be commit 91f4d0675333d7c5d7bb5ff077faaf83e1fd9bfe)
-rw-r--r-- | source3/nmbd/nmbd_winsproxy.c | 4 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd_winsproxy.c b/source3/nmbd/nmbd_winsproxy.c index 1398ebd299..24ba192cdb 100644 --- a/source3/nmbd/nmbd_winsproxy.c +++ b/source3/nmbd/nmbd_winsproxy.c @@ -203,8 +203,8 @@ void make_wins_proxy_name_query_request( struct subnet_record *subrec, struct packet_struct *incoming_packet, struct nmb_name *question_name) { - char ud[sizeof(struct userdata_struct) + sizeof(struct subrec *) + - sizeof(struct packet_struct *)]; + long *ud[(sizeof(struct userdata_struct) + sizeof(struct subrec *) + + sizeof(struct packet_struct *))/sizeof(long *) + 1]; struct userdata_struct *userdata = (struct userdata_struct *)ud; memset(ud, '\0', sizeof(ud)); diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index d1a100aaea..e978718106 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -838,7 +838,7 @@ is one of our (WINS server) names. Denying registration.\n", nmb_namestr(questio if( namerec != NULL ) { - char ud[sizeof(struct userdata_struct) + sizeof(struct packet_struct *)]; + long *ud[(sizeof(struct userdata_struct) + sizeof(struct packet_struct *))/sizeof(long *) + 1]; struct userdata_struct *userdata = (struct userdata_struct *)ud; /* @@ -1146,7 +1146,7 @@ is one of our (WINS server) names. Denying registration.\n", nmb_namestr(questio if(namerec != NULL) { - char ud[sizeof(struct userdata_struct) + sizeof(struct packet_struct *)]; + long *ud[(sizeof(struct userdata_struct) + sizeof(struct packet_struct *))/sizeof(long *) + 1]; struct userdata_struct *userdata = (struct userdata_struct *)ud; /* |