Module Name:    src
Committed By:   jakllsch
Date:           Mon Apr 14 01:56:18 UTC 2014

Modified Files:
        src/sys/dev/acpi: acpi_pci_link.c

Log Message:
don't run off the end of the source resource buffer


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/acpi/acpi_pci_link.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_pci_link.c
diff -u src/sys/dev/acpi/acpi_pci_link.c:1.20 src/sys/dev/acpi/acpi_pci_link.c:1.21
--- src/sys/dev/acpi/acpi_pci_link.c:1.20	Wed Oct 16 17:31:28 2013
+++ src/sys/dev/acpi/acpi_pci_link.c	Mon Apr 14 01:56:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_pci_link.c,v 1.20 2013/10/16 17:31:28 christos Exp $	*/
+/*	$NetBSD: acpi_pci_link.c,v 1.21 2014/04/14 01:56:18 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2002 Mitsuru IWASAKI <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.20 2013/10/16 17:31:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.21 2014/04/14 01:56:18 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -1262,7 +1262,7 @@ acpi_AppendBufferResource(ACPI_BUFFER *b
 	}
 
 	/* Insert the new resource. */
-	memcpy(rp, res, res->Length + ACPI_RS_SIZE_NO_DATA);
+	memcpy(rp, res, res->Length);
 
 	/* And add the terminator. */
 	rp = ACPI_NEXT_RESOURCE(rp);

Reply via email to