summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/ng_parse.c')
-rw-r--r--sys/netgraph/ng_parse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c
index 660cbd3..4ea9abe 100644
--- a/sys/netgraph/ng_parse.c
+++ b/sys/netgraph/ng_parse.c
@@ -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
OpenPOWER on IntegriCloud