Actions
Bug #5007
closedpgsql: coverity warning
Affected Versions:
Effort:
Difficulty:
Label:
Description
Please find the latest report on new defect(s) introduced to Suricata found with Coverity Scan. 1 new defect(s) introduced to Suricata found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1497464: (CONSTANT_EXPRESSION_RESULT) /src/output-json-pgsql.c: 106 in JsonPgsqlLogParseConfig() /src/output-json-pgsql.c: 109 in JsonPgsqlLogParseConfig() ________________________________________________________________________________________________________ *** CID 1497464: (CONSTANT_EXPRESSION_RESULT) /src/output-json-pgsql.c: 106 in JsonPgsqlLogParseConfig() 100 101 const char *query = ConfNodeLookupChildValue(conf, "passwords"); 102 if (query != NULL) { 103 if (ConfValIsTrue(query)) { 104 pgsqllog_ctx->flags |= PGSQL_LOG_PASSWORDS; 105 } else { >>> CID 1497464: (CONSTANT_EXPRESSION_RESULT) >>> "pgsqllog_ctx->flags &= 0U /* !(1UL << 1) */" always assigns 0 to "pgsqllog_ctx->flags". 106 pgsqllog_ctx->flags &= !PGSQL_LOG_PASSWORDS; 107 } 108 } else { 109 pgsqllog_ctx->flags &= !PGSQL_LOG_PASSWORDS; 110 } 111 } /src/output-json-pgsql.c: 109 in JsonPgsqlLogParseConfig() 103 if (ConfValIsTrue(query)) { 104 pgsqllog_ctx->flags |= PGSQL_LOG_PASSWORDS; 105 } else { 106 pgsqllog_ctx->flags &= !PGSQL_LOG_PASSWORDS; 107 } 108 } else { >>> CID 1497464: (CONSTANT_EXPRESSION_RESULT) >>> "pgsqllog_ctx->flags &= 0U /* !(1UL << 1) */" always assigns 0 to "pgsqllog_ctx->flags". 109 pgsqllog_ctx->flags &= !PGSQL_LOG_PASSWORDS; 110 } 111 } 112 113 static OutputInitResult OutputPgsqlLogInitSub(ConfNode *conf, OutputCtx *parent_ctx) 114 {
Actions