Bug 217746 - sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)
Summary: sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)
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-net (Nobody)
Keywords: patch
Depends on:
Reported: 2017-03-13 12:03 UTC by Svyatoslav
Modified: 2017-04-07 00:00 UTC (History)
1 user (show)

See Also:

git patch (768 bytes, patch)
2017-03-13 12:03 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 12:03:40 UTC
Created attachment 180769 [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: V560 A part of conditional expression is always true: 0x7dac. t4_main.c 8001
Comment 1 commit-hook freebsd_committer 2017-03-13 17:17:30 UTC
A commit references this bug:

Author: np
Date: Mon Mar 13 17:16:29 UTC 2017
New revision: 315201
URL: https://svnweb.freebsd.org/changeset/base/315201

  cxgbe(4):  Fix an always-true assertion (reported by PVS-Studio).

  sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)

  PR:		217746
  Submitted by:	Svyatoslav (razmyslov at viva64 com)
  MFC after:	1 week