Bug 217743 - sys/dev/mfi/mfi_tbolt.c: PVS-Studio: Expression is Always True (CWE-571)
Summary: sys/dev/mfi/mfi_tbolt.c: PVS-Studio: Expression is Always True (CWE-571)
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
Keywords: patch
Depends on:
Reported: 2017-03-13 11:51 UTC by Svyatoslav
Modified: 2017-08-08 19:44 UTC (History)
2 users (show)

See Also:

git patch (546 bytes, patch)
2017-03-13 11:51 UTC, Svyatoslav
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svyatoslav 2017-03-13 11:51:26 UTC
Created attachment 180767 [details]
git patch

We have found and fixed a vulnerability using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warning: V547 Expression 'cdb[0] != 0x28 || cdb[0] != 0x2A' is always true. Probably the '&&' operator should be used here. mfi_tbolt.c 1110