From 421aab2e12d3890fe16924ce0a7ad16008a2ec79 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 6 Jan 2012 16:38:44 +0100 Subject: s3: Avoid a potential alignment requirement issue --- source3/param/loadparm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 1310353348..2ab32f8920 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -8504,9 +8504,8 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i if (NT_STATUS_IS_OK(status) && (data.dptr != NULL) && - (data.dsize == sizeof(iService))) - { - iService = *(int *)data.dptr; + (data.dsize == sizeof(iService))) { + memcpy(&iService, data.dptr, sizeof(iService)); } } -- cgit