From owner-svn-soc-all@FreeBSD.ORG Fri Jun 19 15:28:19 2015 Return-Path: Delivered-To: svn-soc-all@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2018246F for ; Fri, 19 Jun 2015 15:28:19 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F168C7C for ; Fri, 19 Jun 2015 15:28:19 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5JFSIaT060842 for ; Fri, 19 Jun 2015 15:28:18 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5JFSIoM060840 for svn-soc-all@FreeBSD.org; Fri, 19 Jun 2015 15:28:18 GMT (envelope-from roam@FreeBSD.org) Date: Fri, 19 Jun 2015 15:28:18 GMT Message-Id: <201506191528.t5JFSIoM060840@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287328 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 15:28:19 -0000 Author: roam Date: Fri Jun 19 15:28:18 2015 New Revision: 287328 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287328 Log: Oops, fix the AYIYA ID length calculation! Yeah, when we want to calculate 2 ** n, it's not exactly 2 << n... ObQuote: "Past the point of no return..." Modified: soc2015/roam/ng_ayiya/ng_ayiya.c Modified: soc2015/roam/ng_ayiya/ng_ayiya.c ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.c Fri Jun 19 15:28:15 2015 (r287327) +++ soc2015/roam/ng_ayiya/ng_ayiya.c Fri Jun 19 15:28:18 2015 (r287328) @@ -491,7 +491,7 @@ return (EINVAL); if (hdr->idlen > 4) return (EINVAL); - const int32_t ofs_sig = ofs_id + (2 << hdr->idlen); + const int32_t ofs_sig = ofs_id + (2 << (hdr->idlen - 1)); if (len < ofs_sig) return (EINVAL); const unsigned siglen = 4 * hdr->siglen;