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 {
Updated by Juliana Fajardini Reichow almost 4 years ago
- Status changed from Assigned to In Progress
Updated by Juliana Fajardini Reichow almost 4 years ago
- Status changed from In Progress to In Review
PR for review: https://github.com/OISF/suricata/pull/6840
Updated by Juliana Fajardini Reichow almost 4 years ago
- Related to Bug #5012: Remove duplicate definition of constants between C and Rust added
Updated by Juliana Fajardini Reichow almost 4 years ago
- Status changed from In Review to Closed
Merged with https://github.com/OISF/suricata/pull/6854
We still have duplicated flags, though (cf related issue).
Actions