summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_eventlog_lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_eventlog_lib.c b/source3/rpc_server/srv_eventlog_lib.c
index 57b3be43ad..d8c5c3d453 100644
--- a/source3/rpc_server/srv_eventlog_lib.c
+++ b/source3/rpc_server/srv_eventlog_lib.c
@@ -551,9 +551,11 @@ bool parse_logentry( TALLOC_CTX *mem_ctx, char *line, struct eventlog_Record_tdb
entry->sid_length = rpcstr_push_talloc(mem_ctx,
&dummy,
stop);
+ if (entry->sid_length == (uint32_t)-1) {
+ return false;
+ }
entry->sid = data_blob_talloc(mem_ctx, dummy, entry->sid_length);
- if (entry->sid_length == (uint32_t)-1 ||
- entry->sid.data == NULL) {
+ if (entry->sid.data == NULL) {
return false;
}
} else if ( 0 == strncmp( start, "STR", stop - start ) ) {