Project

General

Profile

Actions

Bug #5007

closed

pgsql: coverity warning

Added by Victor Julien almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
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     {

Related issues 1 (0 open1 closed)

Related to Suricata - Bug #5012: Remove duplicate definition of constants between C and RustClosedActions
Actions

Also available in: Atom PDF