Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata use memmove() not memcpy() for overlapping regions.
details: https://anonhg.NetBSD.org/src/rev/ece8df4cea6a
branches: trunk
changeset: 455015:ece8df4cea6a
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Oct 04 12:24:32 2019 +0000
description:
use memmove() not memcpy() for overlapping regions.
diffstat:
sys/dev/ata/ata_raid_intel.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 718d794cecf5 -r ece8df4cea6a sys/dev/ata/ata_raid_intel.c
--- a/sys/dev/ata/ata_raid_intel.c Fri Oct 04 12:24:12 2019 +0000
+++ b/sys/dev/ata/ata_raid_intel.c Fri Oct 04 12:24:32 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raid_intel.c,v 1.9 2018/10/22 19:38:06 jdolecek Exp $ */
+/* $NetBSD: ata_raid_intel.c,v 1.10 2019/10/04 12:24:32 mrg Exp $ */
/*-
* Copyright (c) 2000-2008 Søren Schmidt <sos%FreeBSD.org@localhost>
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_raid_intel.c,v 1.9 2018/10/22 19:38:06 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_raid_intel.c,v 1.10 2019/10/04 12:24:32 mrg Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -176,7 +176,7 @@
tmp = (char *)info;
(void)memcpy(tmp + 1024, tmp, 512);
- (void)memcpy(tmp, tmp + 512, 1024);
+ (void)memmove(tmp, tmp + 512, 1024);
(void)memset(tmp + 1024, 0, 512);
/* Check if this is a Intel RAID struct */
Home |
Main Index |
Thread Index |
Old Index