Skip to contentSkip to conversation

coverity issue 1 - MF_EXTERNAL_KEY

Openvpn-devel Gert Doering 1 participant 3 messages Dec 14, 2012 – Dec 16, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

coverity scanned our source tree, found 201 false positives (they do not like msg(M_ERR, ...), msg(M_WARN, ...) or msg(M_FATAL, ...)), and 3 actual code confusions.

I'm now going to post them here, to elicit comments on whether we want to fix 'em, just ignore 'em, or throw out all the source and go drink a beer.

Issue #1: "logical dead code", in options.c, line 2277:

          else
            {
              notnull (options->cert_file, "certificate file (--cert) or PKCS#12 file (--pkcs12)");
#ifdef MANAGMENT_EXTERNAL_KEY
          if (!options->management_flags & MF_EXTERNAL_KEY)
#endif
              notnull (options->priv_key_file, "private key file (--key) or PKCS#12 file (--pkcs12)");
            }

... if I read this right, this is "operator precedence again", and there need to be brackets

#ifdef MANAGMENT_EXTERNAL_KEY
          if (! (options->management_flags & MF_EXTERNAL_KEY) )

#endif

... Arne?

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#1 lore raw

Hi,

Quoted 3 lines · Gert Doering

coverity scanned our source tree, found 201 false positives (they do not like msg(M_ERR, ...), msg(M_WARN, ...) or msg(M_FATAL, ...)), and 3 actual code confusions.

Small correction: in the most recent run, they only found 201+3 things, of which only 2 are really relevant.

Unfortunately, there's much more stuff - 24 issues tagged as "high!", some of them confusion about ASSERT() inside coverity, but some could need some reviewing... volunteers?

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw
In reply to Gert Doering

Hi,

Quoted 1 line · Gert Doering

Issue #1: "logical dead code", in options.c, line 2277:

This has already been fixed, I just hit the gap between "fix, ack, forget", "coverity checks" and "david pushes the fix".

commit feca0900dd005777

-> issue solved. Easy.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...