summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-05 16:36:44 +0100
committerGünther Deschner <gd@samba.org>2009-02-05 16:36:44 +0100
commitf289851d70ea7a8f66a31e9af7d9fc6e16ebffef (patch)
tree524f64ae26db62c3e88441a3a2cfa694ef8056b8 /source3
parentafa960cbbcd609123d710c301e7a9a070c1fed70 (diff)
downloadsamba-f289851d70ea7a8f66a31e9af7d9fc6e16ebffef.tar.gz
samba-f289851d70ea7a8f66a31e9af7d9fc6e16ebffef.tar.bz2
samba-f289851d70ea7a8f66a31e9af7d9fc6e16ebffef.zip
s3-eventlog: fix Coverity #877.
Guenther
Diffstat (limited to 'source3')
-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 ) ) {