socsvn commit: r287328 - soc2015/roam/ng_ayiya
roam at FreeBSD.org
roam at FreeBSD.org
Fri Jun 19 15:28:19 UTC 2015
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;
More information about the svn-soc-all
mailing list