1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

s3-eventlog: fix Coverity #877.

Guenther
This commit is contained in:
Günther Deschner 2009-02-05 16:36:44 +01:00
parent afa960cbbc
commit f289851d70

View File

@ -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 ) ) {