Fix a segfault in parse_logentry
authorVolker Lendecke <vl@samba.org>
Sat, 24 Jan 2009 14:08:14 +0000 (15:08 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 24 Jan 2009 14:08:21 +0000 (15:08 +0100)
entry->data_record.strings is type smb_ucs2, so the pointer arithmetic
increments by two :-)

source3/rpc_server/srv_eventlog_lib.c

index aa75fb1b4699eb70d368dd5ead387711e1720940..8cbb319e9b0e53d227d89e6d56da7f115178c654 100644 (file)
@@ -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;