mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
The size value should be asserted when it is known.
Reported and tested by: pho Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
09e5f3c4b8
commit
64779280c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274878
@ -1800,7 +1800,7 @@ __elfN(note_threadmd)(void *arg, struct sbuf *sb, size_t *sizep)
|
||||
buf = NULL;
|
||||
size = 0;
|
||||
__elfN(dump_thread)(td, buf, &size);
|
||||
KASSERT(*sizep == size, ("invalid size"));
|
||||
KASSERT(sb == NULL || *sizep == size, ("invalid size"));
|
||||
if (size != 0 && sb != NULL)
|
||||
sbuf_bcat(sb, buf, size);
|
||||
free(buf, M_TEMP);
|
||||
|
Loading…
Reference in New Issue
Block a user