[exim-dev] [Bug 3124] New: cppcheck found null dereference

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Bugzilla
Datum:  
To: exim-dev
Betreff: [exim-dev] [Bug 3124] New: cppcheck found null dereference
https://bugs.exim.org/show_bug.cgi?id=3124

            Bug ID: 3124
           Summary: cppcheck found null dereference
           Product: Exim
           Version: 4.98
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Unfiled
          Assignee: unallocated@???
          Reporter: exim@???
                CC: exim-dev@???


cppcheck src/smtp_in.c

Checking src/smtp_in.c
src/smtp_in.c:2388:13: warning: Possible null pointer dereference: opt
[nullPointer]
     opt += opt[1];
            ^
src/smtp_in.c:2381:9: note: Assignment 'opt=NULL', assigned value is 0
  opt = NULL;
        ^
src/smtp_in.c:2388:13: note: Null pointer dereference
     opt += opt[1];
            ^


https://git.exim.org/exim.git/blob/HEAD:/src/src/smtp_in.c#l2371

I wonder whether the break is intended to break out of the switch rather than
just the while ?

(A goto might be a reasonable solution here ? )

--
You are receiving this mail because:
You are on the CC list for the bug.

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/