summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-03-01 03:10:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:53 -0500
commita2327fc68848a1352fed5273969d4c674b1dbd73 (patch)
tree3456be41aeaaae4eff612c6c504ebb9d842ebddd /source3/rpc_server
parent5837baa12672dd0c0ee3f1011fba6c11bb9d3da9 (diff)
downloadsamba-a2327fc68848a1352fed5273969d4c674b1dbd73.tar.gz
samba-a2327fc68848a1352fed5273969d4c674b1dbd73.tar.bz2
samba-a2327fc68848a1352fed5273969d4c674b1dbd73.zip
r13766: Patch from Arek Glabek <aglabek@centeris.com>:
* Fix parsing error in eventlogadm caused by log entries with no DAT: line. (This used to be commit f0a8f438793a806e8cf73e1e695b09e540a4239e)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_eventlog_lib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c
index ec5edf2f34..b3d94901ba 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 */