[Bug 48972] New: Bugs found by static analyzers

WineHQ Bugzilla wine-bugs at winehq.org
Sun Apr 19 10:43:32 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48972

            Bug ID: 48972
           Summary: Bugs found by static analyzers
           Product: Wine
           Version: 5.6
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
          Assignee: wine-bugs at winehq.org
          Reporter: mikrutrafal54 at gmail.com
      Distribution: ---

Errors found by
Cppcheck(unpack and open index.html) -
https://gitlab.com/qarmin/wine/-/jobs/513792350/artifacts/download
Sonarcloud -
https://sonarcloud.io/project/issues?id=qarmin_wine&resolved=false&types=BUG

1. !canonicalized_len should be instead !canonicalized
https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/kernelbase/path.c#L3524
should look like
https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/kernelbase/path.c#L3490


2. Should be probably `iter && iter->parent`
https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/mshtml/htmlwindow.c#L90

3. Strange subtracting from itself(but it may want to save style of code)
https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/wined3d/adapter_gl.c#L3857

4. pIt may be null in 228 but it is used in 227
https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/dmime/segment.c#L227-L230
also here
https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/dmime/segment.c#L254-L258

5. jsdisp->ctx == ctx so it can't be jsdisp->ctx != ctx

https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/jscript/dispex.c#L2076-L2077

6. code > 0xffff is always true - probably code > 0 should look like code < 0
https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc77c07/dlls/vbscript/global.c#L2933

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list