Received: by mail.netbsd.org (Postfix, from userid 605) id F234784DBC; Tue, 2 Oct 2018 18:49:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id F120384DC4 for ; Tue, 2 Oct 2018 18:49:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id WDR4sw1pJb0d for ; Tue, 2 Oct 2018 18:49:24 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 6D7C584D21 for ; Tue, 2 Oct 2018 18:49:24 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 56CACFBEE; Tue, 2 Oct 2018 18:49:24 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Tue, 2 Oct 2018 14:49:24 -0400 From: "Christos Zoulas" Subject: CVS commit: src/crypto/dist/ipsec-tools/src/racoon To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20181002184924.56CACFBEE@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Christos Zoulas" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: christos Date: Tue Oct 2 18:49:24 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: isakmp_frag.c Log Message: PR/53646: Thomas Reim: Incorrect detection of the packet complete code in fragment list check. While the fix in https://launchpad.net/~rdratlos/+archive/ubuntu/racoon - if (i > last_frag) /* It is complete */ + if (i >= last_frag) /* It is complete */ has the correct behavior, it violates the test for successful completion of the invariant of the loop: for (i = 1; i <= last_frag; i++) { if (!check_fragment_index()) break; } if (i > last_frag) return ok; It is better to move the check for NULL in the loop earlier, so that the final iteration is done and the test is kept the same. It makes the code easier to understand and preserves the original intent. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.