DragonFlyBSD Kernel Audit
DF-0096 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/kern/subr_sglist.c b/sys/kern/subr_sglist.c
--- a/sys/kern/subr_sglist.c
+++ b/sys/kern/subr_sglist.c
@@ -610,7 +610,7 @@
 		flast->ss_len += sfirst->ss_len;
 
 	/* Append new segments from 'second' to 'first'. */
-	bcopy(first->sg_segs + first->sg_nseg, second->sg_segs + append,
+	bcopy(second->sg_segs + append, first->sg_segs + first->sg_nseg,
 	    (second->sg_nseg - append) * sizeof(struct sglist_seg));
 	first->sg_nseg += second->sg_nseg - append;
 	sglist_reset(second);