1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00

Fix bug in previous commit.

Submitted by:	Harti Brandt <brandt@fokus.gmd.de>
This commit is contained in:
Archie Cobbs 2002-02-12 18:33:10 +00:00
parent 9fa950f1b5
commit 3cbeb9758d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90584

View File

@ -1338,8 +1338,7 @@ ng_unparse_composite(const struct ng_parse_type *type, const u_char *data,
if (sizeof(*hdr) + *off < workSize) {
int tempsize = workSize - sizeof(*hdr) - *off;
bcopy(hdr, workBuf, sizeof(*hdr));
bcopy(data + sizeof(*hdr), workBuf, *off);
bcopy(hdr, workBuf, sizeof(*hdr) + *off);
if (ng_get_composite_elem_default(type, index, workBuf
+ sizeof(*hdr), workBuf + sizeof(*hdr) + *off,
&tempsize, ctype) == 0