Skip to content

Commit

Permalink
ALSA: hda - Use snprintf() to be safer
Browse files Browse the repository at this point in the history
Use snprint() for creating the jack name string instead of sprintf()
in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 22, 2009
1 parent b04add9 commit 86de741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4066,7 +4066,7 @@ static int stac92xx_add_jack(struct hda_codec *codec,
jack->nid = nid;
jack->type = type;

sprintf(name, "%s at %s %s Jack",
snprintf(name, sizeof(name), "%s at %s %s Jack",
snd_hda_get_jack_type(def_conf),
snd_hda_get_jack_connectivity(def_conf),
snd_hda_get_jack_location(def_conf));
Expand Down

0 comments on commit 86de741

Please sign in to comment.