summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/param/loadparm.c5
1 files changed, 2 insertions, 3 deletions
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));
}
}