]> Pileus Git - ~andy/linux/blobdiff - sound/core/init.c
Merge tag 'nfs-for-3.13-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[~andy/linux] / sound / core / init.c
index 6b9087115da24806e8aba244127ac8ec3a4e93f8..1351f22f651cdf420ee3bfd7b550c3760b3d9a23 100644 (file)
@@ -66,7 +66,7 @@ static int module_slot_match(struct module *module, int idx)
 #ifdef MODULE
        const char *s1, *s2;
 
-       if (!module || !module->name || !slots[idx])
+       if (!module || !*module->name || !slots[idx])
                return 0;
 
        s1 = module->name;
@@ -597,7 +597,7 @@ static void snd_card_set_id_no_lock(struct snd_card *card, const char *src,
        /* last resort... */
        snd_printk(KERN_ERR "unable to set card id (%s)\n", id);
        if (card->proc_root->name)
-               strcpy(card->id, card->proc_root->name);
+               strlcpy(card->id, card->proc_root->name, sizeof(card->id));
 }
 
 /**