summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-05-19 18:38:43 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-05-19 18:38:43 +0000
commit57dd5dccc3af1edda9cfb0d700940212d645e07c (patch)
tree82a83b62bc8700b29f77fa9332bc0c2e5430b1f2 /sys/dev
parent1cf1f6f074440efca0ccecb80f13dec233cfb7da (diff)
strlcpy; millert@ ok
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uaudio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index 7f283104d42..248ad857474 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.16 2003/05/19 05:27:00 nate Exp $ */
+/* $OpenBSD: uaudio.c,v 1.17 2003/05/19 18:38:42 miod Exp $ */
/* $NetBSD: uaudio.c,v 1.67 2003/05/03 18:11:41 wiz Exp $ */
/*
@@ -628,7 +628,7 @@ uaudio_mixer_alias_ctl(struct uaudio_softc *sc, struct mixerctl *mc,
const char *name)
{
/* XXX mark as alias? */
- strcpy(mc->ctlname, name);
+ strlcpy(mc->ctlname, name, sizeof mc->ctlname);
uaudio_mixer_add_ctl(sc, mc);
}
@@ -1415,19 +1415,20 @@ uaudio_query_devinfo(void *addr, mixer_devinfo_t *mi)
mi->type = AUDIO_MIXER_CLASS;
mi->mixer_class = UAC_OUTPUT;
mi->next = mi->prev = AUDIO_MIXER_LAST;
- strcpy(mi->label.name, AudioCoutputs);
+ strlcpy(mi->label.name, AudioCoutputs, sizeof mi->label.name);
return (0);
case UAC_INPUT:
mi->type = AUDIO_MIXER_CLASS;
mi->mixer_class = UAC_INPUT;
mi->next = mi->prev = AUDIO_MIXER_LAST;
- strcpy(mi->label.name, AudioCinputs);
+ strlcpy(mi->label.name, AudioCinputs, sizeof mi->label.name);
return (0);
case UAC_EQUAL:
mi->type = AUDIO_MIXER_CLASS;
mi->mixer_class = UAC_EQUAL;
mi->next = mi->prev = AUDIO_MIXER_LAST;
- strcpy(mi->label.name, AudioCequalization);
+ strlcpy(mi->label.name, AudioCequalization,
+ sizeof mi->label.name);
return (0);
default:
break;