diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-02-07 06:14:04 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-07 06:33:20 -0500 |
commit | 873ab035752e62a90eaeb1daf88a44dad1da6ea0 (patch) | |
tree | 6199bfcd9207ae1adcabb52ab14b86489ee40213 /sound/x86 | |
parent | 075a1d46bed386138eb51f92a6a3130c82fdefec (diff) |
ALSA: x86: Fix driver name string overflow
The driver sets card->driver name string over its size (16 bytes).
Shorten the name string to fit with it.
Also, set more verbose string to card->shortname and ->longname.
This doesn't have to be identical with card->driver at all.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r-- | sound/x86/intel_hdmi_audio.c | 3 | ||||
-rw-r--r-- | sound/x86/intel_hdmi_lpe_audio.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index 8506a3dc0298..dd7944c5ebc2 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c | |||
@@ -1694,7 +1694,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev) | |||
1694 | ctx->card = card; | 1694 | ctx->card = card; |
1695 | ctx->aes_bits = SNDRV_PCM_DEFAULT_CON_SPDIF; | 1695 | ctx->aes_bits = SNDRV_PCM_DEFAULT_CON_SPDIF; |
1696 | strcpy(card->driver, INTEL_HAD); | 1696 | strcpy(card->driver, INTEL_HAD); |
1697 | strcpy(card->shortname, INTEL_HAD); | 1697 | strcpy(card->shortname, "Intel HDMI/DP LPE Audio"); |
1698 | strcpy(card->longname, "Intel HDMI/DP LPE Audio"); | ||
1698 | 1699 | ||
1699 | ctx->irq = -1; | 1700 | ctx->irq = -1; |
1700 | ctx->tmds_clock_speed = DIS_SAMPLE_RATE_148_5; | 1701 | ctx->tmds_clock_speed = DIS_SAMPLE_RATE_148_5; |
diff --git a/sound/x86/intel_hdmi_lpe_audio.h b/sound/x86/intel_hdmi_lpe_audio.h index ca4212dca94e..48cab1b84c7b 100644 --- a/sound/x86/intel_hdmi_lpe_audio.h +++ b/sound/x86/intel_hdmi_lpe_audio.h | |||
@@ -57,7 +57,7 @@ | |||
57 | #define HAD_REG_WIDTH 0x08 | 57 | #define HAD_REG_WIDTH 0x08 |
58 | #define HAD_MAX_HW_BUFS 0x04 | 58 | #define HAD_MAX_HW_BUFS 0x04 |
59 | #define HAD_MAX_DIP_WORDS 16 | 59 | #define HAD_MAX_DIP_WORDS 16 |
60 | #define INTEL_HAD "IntelHdmiLpeAudio" | 60 | #define INTEL_HAD "HdmiLpeAudio" |
61 | 61 | ||
62 | /* DP Link Rates */ | 62 | /* DP Link Rates */ |
63 | #define DP_2_7_GHZ 270000 | 63 | #define DP_2_7_GHZ 270000 |