1616#include <linux/platform_device.h>
1717#include <linux/io.h>
1818#include <linux/slab.h>
19+ #include <linux/string.h>
1920#include <linux/module.h>
2021
2122#include <asm/ip32/ip32_ints.h>
@@ -685,7 +686,7 @@ static int snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip)
685686 return err ;
686687
687688 pcm -> private_data = chip ;
688- strcpy (pcm -> name , "SGI O2 DAC1" );
689+ strscpy (pcm -> name , "SGI O2 DAC1" );
689690
690691 /* set operators */
691692 snd_pcm_set_ops (pcm , SNDRV_PCM_STREAM_PLAYBACK ,
@@ -700,7 +701,7 @@ static int snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip)
700701 return err ;
701702
702703 pcm -> private_data = chip ;
703- strcpy (pcm -> name , "SGI O2 DAC2" );
704+ strscpy (pcm -> name , "SGI O2 DAC2" );
704705
705706 /* set operators */
706707 snd_pcm_set_ops (pcm , SNDRV_PCM_STREAM_PLAYBACK ,
@@ -892,8 +893,8 @@ static int snd_sgio2audio_probe(struct platform_device *pdev)
892893 return err ;
893894 }
894895
895- strcpy (card -> driver , "SGI O2 Audio" );
896- strcpy (card -> shortname , "SGI O2 Audio" );
896+ strscpy (card -> driver , "SGI O2 Audio" );
897+ strscpy (card -> shortname , "SGI O2 Audio" );
897898 sprintf (card -> longname , "%s irq %i-%i" ,
898899 card -> shortname ,
899900 MACEISA_AUDIO1_DMAT_IRQ ,
0 commit comments