[Midnightbsd-cvs] src [9021] trunk/sys/cddl/dev/fbt/fbt.c: fbt_typeoff_init: fix an off by one in determining required memory size.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 29 21:56:38 EDT 2016
Revision: 9021
http://svnweb.midnightbsd.org/src/?rev=9021
Author: laffer1
Date: 2016-09-29 21:56:38 -0400 (Thu, 29 Sep 2016)
Log Message:
-----------
fbt_typeoff_init: fix an off by one in determining required memory size.
Modified Paths:
--------------
trunk/sys/cddl/dev/fbt/fbt.c
Modified: trunk/sys/cddl/dev/fbt/fbt.c
===================================================================
--- trunk/sys/cddl/dev/fbt/fbt.c 2016-09-30 01:56:12 UTC (rev 9020)
+++ trunk/sys/cddl/dev/fbt/fbt.c 2016-09-30 01:56:38 UTC (rev 9021)
@@ -778,6 +778,8 @@
pop[kind]++;
}
+ /* account for a sentinel value below */
+ ctf_typemax++;
*lc->typlenp = ctf_typemax;
if ((xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, M_ZERO | M_WAITOK)) == NULL)
More information about the Midnightbsd-cvs
mailing list