svn commit: r248947 - stable/9/sys/cddl/dev/fbt

Andriy Gapon avg at FreeBSD.org
Sun Mar 31 14:02:28 UTC 2013


Author: avg
Date: Sun Mar 31 14:02:28 2013
New Revision: 248947
URL: http://svnweb.freebsd.org/changeset/base/248947

Log:
  MFC r248640: fbt_typoff_init: fix an off by one in determining required
  memory size

Modified:
  stable/9/sys/cddl/dev/fbt/fbt.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cddl/dev/fbt/fbt.c
==============================================================================
--- stable/9/sys/cddl/dev/fbt/fbt.c	Sun Mar 31 13:56:13 2013	(r248946)
+++ stable/9/sys/cddl/dev/fbt/fbt.c	Sun Mar 31 14:02:28 2013	(r248947)
@@ -777,6 +777,8 @@ fbt_typoff_init(linker_ctf_t *lc)
 		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 svn-src-all mailing list