Mailing List Archive

[DBMail 0001041]: [sortsieve.c:370]: (style) Array index 'j' is used before limits check.
The following issue has been SUBMITTED.
======================================================================
http://www.dbmail.org/mantis/view.php?id=1041
======================================================================
Reported By: dcb314
Assigned To:
======================================================================
Project: DBMail
Issue ID: 1041
Category: General
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 04-Feb-14 22:29 CET
Last Modified: 04-Feb-14 22:29 CET
======================================================================
Summary: [sortsieve.c:370]: (style) Array index 'j' is used
before limits check.
Description:
I just ran the static analyser cppcheck over
the source code of dbmail-3.0.2

It said many things, including

[sortsieve.c:370]: (style) Array index 'j' is used before limits check.

Source code is

for (j = 0; imap_flag_desc[j] && j < IMAP_NFLAGS; j++) {

Suggest make j sanity check before use. I also checked
the most recent code in git and the problem exists there also.


======================================================================

Issue History
Date Modified Username Field Change
======================================================================
04-Feb-14 22:29 dcb314 New Issue
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
[DBMail 0001041]: [sortsieve.c:370]: (style) Array index 'j' is used before limits check. [ In reply to ]
The following issue has been CLOSED
======================================================================
http://www.dbmail.org/mantis/view.php?id=1041
======================================================================
Reported By: dcb314
Assigned To:
======================================================================
Project: DBMail
Issue ID: 1041
Category: General
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
target:
Resolution: no change required
Fixed in Version:
======================================================================
Date Submitted: 04-Feb-14 22:29 CET
Last Modified: 05-Feb-14 08:48 CET
======================================================================
Summary: [sortsieve.c:370]: (style) Array index 'j' is used
before limits check.
Description:
I just ran the static analyser cppcheck over
the source code of dbmail-3.0.2

It said many things, including

[sortsieve.c:370]: (style) Array index 'j' is used before limits check.

Source code is

for (j = 0; imap_flag_desc[j] && j < IMAP_NFLAGS; j++) {

Suggest make j sanity check before use. I also checked
the most recent code in git and the problem exists there also.


======================================================================

----------------------------------------------------------------------
(0003631) paul (administrator) - 05-Feb-14 08:48
http://www.dbmail.org/mantis/view.php?id=1041#c3631
----------------------------------------------------------------------
This is a false positive. There maybe still some problems in the master
branch wrt the sortsieve.c and authldap.c modules, but the rest of the code
has been thoroughly vetted using the coverity static analyser.

Don't spend any time on the 3.0 codebase. It's old and no longer
maintained.

The 3.1 code also will *not* be fixed for problems found with static
analysis, so all such efforts should be aimed at the master branch.

Issue History
Date Modified Username Field Change
======================================================================
04-Feb-14 22:29 dcb314 New Issue
05-Feb-14 08:48 paul Note Added: 0003631
05-Feb-14 08:48 paul Status new => closed
05-Feb-14 08:48 paul Resolution open => no change
required
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev