Skip to content

Commit

Permalink
ASoC: Use snprintf() when generating stream names
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed Dec 31, 2009
1 parent 633154d commit 40ca114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,8 +1276,8 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
codec_dai->codec = card->codec;

/* check client and interface hw capabilities */
sprintf(new_name, "%s %s-%d", dai_link->stream_name, codec_dai->name,
num);
snprintf(new_name, sizeof(new_name), "%s %s-%d",
dai_link->stream_name, codec_dai->name, num);

if (codec_dai->playback.channels_min)
playback = 1;
Expand Down

0 comments on commit 40ca114

Please sign in to comment.