Return-Path: X-RT-Incoming-Encryption: Not encrypted References: <5a3073d68c236_601632732824454@ss1435.mail> X-RT-Original-Encoding: utf-8 Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.pao1.isc.org", Issuer "COMODO RSA Organization Validation Secure Server CA" (not verified)) by bugs.isc.org (Postfix) with ESMTPS id 4BD7AD78B0B for ; Thu, 11 Jan 2018 12:22:15 +0000 (UTC) Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id AE86F3AB003 for ; Thu, 11 Jan 2018 12:22:13 +0000 (UTC) Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 425AA160046 for ; Thu, 11 Jan 2018 12:22:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 1FB4B16006A for ; Thu, 11 Jan 2018 12:22:12 +0000 (UTC) Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gOH0ngWh23iC for ; Thu, 11 Jan 2018 12:22:12 +0000 (UTC) Received: from [192.168.0.18] (c220-239-233-234.belrs5.nsw.optusnet.com.au [220.239.233.234]) by zmx1.isc.org (Postfix) with ESMTPSA id 6EE28160046 for ; Thu, 11 Jan 2018 12:22:11 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-Mailer: Apple Mail (2.3273) From: "Mark Andrews" To: bind9-confidential@isc.org Subject: Re: [ISC-Bugs #46841] New Defects reported by Coverity Scan for BIND X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mx.pao1.isc.org MIME-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) content-type: text/plain; charset="utf-8" From marka@isc.org Thu Jan 11 12:22:15 2018 X-RT-Interface: Email In-Reply-To: Delivered-To: bind9-confidential@bugs.isc.org Message-ID: <24AAAF10-397B-44AB-B6FE-A94948AD2885@isc.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD autolearn=disabled version=3.4.1 X-Original-To: bind9-confidential@bugs.isc.org Date: Thu, 11 Jan 2018 23:22:09 +1100 RT-Message-ID: Content-Length: 1075 Think of it like testing if a switch on a enum has a case for possible enum element. Now apply that same thinking to a array which is sized using a enum. > On 11 Jan 2018, at 11:13 pm, Michał Kępień via RT wrote: > >> Coverity is trying each enum value and the final index value is out of range of the array indexes give C is zero based. > > But the flagged code is not even an array _access_, it is an array > _declaration_. > >> We could also just mark these as intentional and ignore them. > > This is what I would be more inclined to do. I still do not understand > how using [ + 1] for the array size would help, but given that I > expect this code to be rewritten pretty soon anyway, feel free to make > the warning go away in any way you deem appropriate and let's not waste > any more time discussing this. > > > -- > Ticket History: https://bugs.isc.org/Ticket/Display.html?id=46841 -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org