From dd2695fe52374cb72bf0954805ff614eef640eae Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 24 Jan 2009 02:10:47 +0100 Subject: s3-eventlog: fix various invalid memcpy in read_package_entry(). Guenther --- source3/rpc_server/srv_eventlog_nt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c index 0bf0730d39..5b98ea54f4 100644 --- a/source3/rpc_server/srv_eventlog_nt.c +++ b/source3/rpc_server/srv_eventlog_nt.c @@ -539,30 +539,30 @@ static Eventlog_entry *read_package_entry( TALLOC_CTX *mem_ctx, return NULL; } offset = entry->data; - memcpy( offset, &( entry->data_record.source_name ), + memcpy( offset, entry->data_record.source_name, entry->data_record.source_name_len ); offset += entry->data_record.source_name_len; - memcpy( offset, &( entry->data_record.computer_name ), + memcpy( offset, entry->data_record.computer_name, entry->data_record.computer_name_len ); offset += entry->data_record.computer_name_len; /* SID needs to be DWORD-aligned */ offset += entry->data_record.sid_padding; entry->record.user_sid_offset = sizeof( Eventlog_record ) + ( offset - entry->data ); - memcpy( offset, &( entry->data_record.sid ), + memcpy( offset, entry->data_record.sid, entry->record.user_sid_length ); offset += entry->record.user_sid_length; /* Now do the strings */ entry->record.string_offset = sizeof( Eventlog_record ) + ( offset - entry->data ); - memcpy( offset, &( entry->data_record.strings ), + memcpy( offset, entry->data_record.strings, entry->data_record.strings_len ); offset += entry->data_record.strings_len; /* Now do the data */ entry->record.data_length = entry->data_record.user_data_len; entry->record.data_offset = sizeof( Eventlog_record ) + ( offset - entry->data ); - memcpy( offset, &( entry->data_record.user_data ), + memcpy( offset, entry->data_record.user_data, entry->data_record.user_data_len ); offset += entry->data_record.user_data_len; -- cgit