From: Takashi Iwai Date: Wed, 22 Jul 2009 14:02:46 +0000 (+0200) Subject: ALSA: hda - Use snprintf() to be safer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86de7416600e93835eeacee379aea939b6a0917a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ALSA: hda - Use snprintf() to be safer Use snprint() for creating the jack name string instead of sprintf() in patch_sigmatel.c. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index da7f9f65c04..512f3b9b9a4 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -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));