Date: Fri, 19 Jun 2015 15:28:18 GMT From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287328 - soc2015/roam/ng_ayiya Message-ID: <201506191528.t5JFSIoM060840@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506191528.t5JFSIoM060840>