Bug 218005 - sys/netinet/sctp_pcb.c: PVS-Studio: Unreachable code detected (CWE-561)
Summary: sys/netinet/sctp_pcb.c: PVS-Studio: Unreachable code detected (CWE-561)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-net
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-03-22 13:21 UTC by Svyatoslav
Modified: 2017-07-27 01:24 UTC (History)
2 users (show)

See Also:


Attachments
git patch (474 bytes, patch)
2017-03-22 13:21 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-22 13:21:09 UTC
Created attachment 181054 [details]
git patch

We have found and fixed a weakness 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: V779 Unreachable code detected. It is possible that an error is present. sctp_pcb.c 183
Comment 1 Michael Tuexen freebsd_committer 2017-03-24 12:46:36 UTC
I would like to keep the code as is. In case of a panic I can still investigate the vrf.
Comment 2 Ed Maste freebsd_committer 2017-07-27 01:24:26 UTC
I agree with leaving the code as is. Svyatoslav is there an easy way that pvs-studio would be convinced this is a false positive?