diff options
author | Günther Deschner <gd@samba.org> | 2009-01-24 02:10:47 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-01-24 03:00:38 +0100 |
commit | dd2695fe52374cb72bf0954805ff614eef640eae (patch) | |
tree | 7146809b8702c805b6a0a455edb59d3013458d35 | |
parent | cf41042a3c4ccf613e312570d8d93932b54dcaee (diff) | |
download | samba-dd2695fe52374cb72bf0954805ff614eef640eae.tar.gz samba-dd2695fe52374cb72bf0954805ff614eef640eae.tar.bz2 samba-dd2695fe52374cb72bf0954805ff614eef640eae.zip |
s3-eventlog: fix various invalid memcpy in read_package_entry().
Guenther
-rw-r--r-- | source3/rpc_server/srv_eventlog_nt.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |