diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-09-15 21:04:11 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-09-15 21:04:11 +0000 |
commit | 74dab29e6a5ee19cd0da42972bb96f0bea67b4eb (patch) | |
tree | 718a0713473788fbd9acac6fde601df4f31e25c5 /sys/arch | |
parent | e794ce4de9e387f03f554cace9e271dc7b7e8a45 (diff) |
Fix overlapping memcpy found by Maxime Villard's Brainy Code Scanner.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/dev/vdsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/vdsp.c b/sys/arch/sparc64/dev/vdsp.c index 9abb4aeaf25..261ccff89ac 100644 --- a/sys/arch/sparc64/dev/vdsp.c +++ b/sys/arch/sparc64/dev/vdsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsp.c,v 1.39 2015/02/11 12:09:18 miod Exp $ */ +/* $OpenBSD: vdsp.c,v 1.40 2015/09/15 21:04:10 kettenis Exp $ */ /* * Copyright (c) 2009, 2011, 2014 Mark Kettenis * @@ -1518,7 +1518,7 @@ vdsp_set_vtoc(void *arg1, void *arg2) sl = (struct sun_vtoc_preamble *)sc->sc_label; memcpy(sl->sl_text, vt->ascii_label, sizeof(sl->sl_text)); sl->sl_version = 0x01; - memcpy(sl->sl_volume, sl->sl_volume, sizeof(sl->sl_volume)); + memcpy(sl->sl_volume, vt->volume_name, sizeof(sl->sl_volume)); sl->sl_nparts = vt->num_partitions; for (i = 0; i < vt->num_partitions; i++) { sl->sl_part[i].spi_tag = vt->partition[i].id_tag; |