NetBSD Problem Report #50815
From www@NetBSD.org Tue Feb 16 08:43:36 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id C8F657ABF7
for <gnats-bugs@gnats.NetBSD.org>; Tue, 16 Feb 2016 08:43:35 +0000 (UTC)
Message-Id: <20160216084334.EDF047ACD0@mollari.NetBSD.org>
Date: Tue, 16 Feb 2016 08:43:34 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: crypto/dist/ipsec-tools/src/racoon/cfparse.y: 2 * redundant test ?
X-Send-Pr-Version: www-1.0
>Number: 50815
>Category: lib
>Synopsis: crypto/dist/ipsec-tools/src/racoon/cfparse.y: 2 * redundant test ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 16 08:45:00 +0000 2016
>Closed-Date: Wed Feb 17 20:11:45 +0000 2016
>Last-Modified: Wed Feb 17 20:15:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160216
>Organization:
>Environment:
>Description:
1.
src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:1494]: (style) Same expression on both sides of '||'.
Source code is
if (($5 == IPPROTO_ICMP || $5 == IPPROTO_ICMPV6)
&& ($4 != IPSEC_PORT_ANY || $4 != IPSEC_PORT_ANY)) {
2.
src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:1544]: (style) Same expression on both sides of '||'.
Source code is
if (($6 == IPPROTO_ICMP || $6 == IPPROTO_ICMPV6)
&& ($5 != IPSEC_PORT_ANY || $5 != IPSEC_PORT_ANY)) {
Also, in the same file, is this oddity:
[src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:2741]: (warning) Division by result of sizeof(). memset() expects a size in bytes, did you intend to multiply instead?
Source code is
memset(types, 0, ARRAYLEN(types));
Maybe better code
memset(types, 0, sizeof(types));
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 17 Feb 2016 20:11:45 +0000
State-Changed-Why:
Fixed by christos, thanks.
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50815 CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Date: Wed, 17 Feb 2016 15:11:17 -0500
Module Name: src
Committed By: christos
Date: Wed Feb 17 20:11:17 UTC 2016
Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: cfparse.y
Log Message:
PR/50815: David Binderman: Remove dup test
To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/crypto/dist/ipsec-tools/src/racoon/cfparse.y
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.