From a2327fc68848a1352fed5273969d4c674b1dbd73 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 1 Mar 2006 03:10:21 +0000 Subject: r13766: Patch from Arek Glabek : * Fix parsing error in eventlogadm caused by log entries with no DAT: line. (This used to be commit f0a8f438793a806e8cf73e1e695b09e540a4239e) --- source3/rpc_server/srv_eventlog_lib.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c index ec5edf2f347..b3d94901bac 100644 --- a/source3/rpc_server/srv_eventlog_lib.c +++ b/source3/rpc_server/srv_eventlog_lib.c @@ -707,16 +707,13 @@ BOOL parse_logentry( char *line, Eventlog_entry * entry, BOOL * eor ) memset( temp, 0, sizeof( temp ) ); strncpy( temp, stop, temp_len ); rpcstr_push( ( void * ) ( entry->data_record.strings + - entry->data_record.strings_len ), + ( entry->data_record.strings_len / 2 ) ), temp, sizeof( entry->data_record.strings ) - - entry->data_record.strings_len, STR_TERMINATE ); - entry->data_record.strings_len += temp_len + 1; + ( entry->data_record.strings_len / 2 ), STR_TERMINATE ); + entry->data_record.strings_len += ( temp_len * 2 ) + 2; entry->record.num_strings++; } else if ( 0 == strncmp( start, "DAT", stop - start ) ) { - /* Now that we're done processing the STR data, adjust the length to account for - unicode, then proceed with the DAT data. */ - entry->data_record.strings_len *= 2; /* skip past initial ":" */ stop++; /* now skip any other leading whitespace */ -- cgit