From: Volker Lendecke Date: Sat, 24 Jan 2009 14:08:14 +0000 (+0100) Subject: Fix a segfault in parse_logentry X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=8b804077128cd981bf238b2506c589dff3bf8ff4 Fix a segfault in parse_logentry entry->data_record.strings is type smb_ucs2, so the pointer arithmetic increments by two :-) --- diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c index aa75fb1b4699..8cbb319e9b0e 100644 --- a/source3/rpc_server/srv_eventlog_lib.c +++ b/source3/rpc_server/srv_eventlog_lib.c @@ -715,7 +715,7 @@ bool parse_logentry( char *line, Eventlog_entry * entry, bool * eor ) if (!entry->data_record.strings) { return false; } - memcpy(entry->data_record.strings + old_len, + memcpy(((char *)entry->data_record.strings) + old_len, temp, tmp_len); entry->data_record.strings_len += tmp_len;