* [PATCH] fix SB crash
@ 2003-01-13 8:25 Clemens Ladisch
2003-01-13 9:53 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Clemens Ladisch @ 2003-01-13 8:25 UTC (permalink / raw)
To: alsa-devel
snd_ctl_new1() is called from snd_sbmixer_add_ctl() with ncontrol->name
set to NULL.
Index: core/control.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/control.c,v
retrieving revision 1.26
diff -u -r1.26 control.c
--- core/control.c 7 Jan 2003 12:27:45 -0000 1.26
+++ core/control.c 13 Jan 2003 08:19:27 -0000
@@ -211,7 +211,8 @@
kctl.id.iface = ncontrol->iface;
kctl.id.device = ncontrol->device;
kctl.id.subdevice = ncontrol->subdevice;
- strncpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)-1);
+ if (ncontrol->name)
+ strncpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)-1);
kctl.id.index = ncontrol->index;
kctl.access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
(ncontrol->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|SNDRV_CTL_ELEM_ACCESS_INACTIVE|SNDRV_CTL_ELEM_ACCESS_INDIRECT));
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-13 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-13 8:25 [PATCH] fix SB crash Clemens Ladisch
2003-01-13 9:53 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.