Bug 217742 - sys/dev/isci/scil/scif_sas_controller.c: PVS-Studio: Expression is Always False (CWE-570)
Summary: sys/dev/isci/scil/scif_sas_controller.c: PVS-Studio: Expression is Always Fal...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-scsi mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-03-13 11:46 UTC by Svyatoslav
Modified: 2017-03-13 18:34 UTC (History)
3 users (show)

See Also:


Attachments
git patch (695 bytes, patch)
2017-03-13 11:46 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:46:14 UTC
Created attachment 180766 [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 is always false. scif_sas_controller.c 531
Comment 1 commit-hook freebsd_committer 2017-03-13 17:59:12 UTC
A commit references this bug:

Author: cem
Date: Mon Mar 13 17:58:08 UTC 2017
New revision: 315205
URL: https://svnweb.freebsd.org/changeset/base/315205

Log:
  scif_sas_controller: Fix inverted logic range check

  PR:		217742
  Submitted by:	Svyatoslav <razmyslov at viva64.com>
  Sponsored by:	Viva64 (PVS-Studio)

Changes:
  head/sys/dev/isci/scil/scif_sas_controller.c