[alsa-devel] [PATCH] HDMI - fix ELD monitor name length

Wu Fengguang fengguang.wu at intel.com
Wed Jun 29 08:26:07 CEST 2011


I noticed that the last character of the ELD monitor name is lost,
this fixes the issue.

Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
---
 sound/pci/hda/hda_eld.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- sound-2.6.orig/sound/pci/hda/hda_eld.c	2011-06-29 13:08:23.000000000 +0800
+++ sound-2.6/sound/pci/hda/hda_eld.c	2011-06-29 14:13:25.000000000 +0800
@@ -294,7 +294,7 @@ static int hdmi_update_eld(struct hdmi_e
 		snd_printd(KERN_INFO "HDMI: out of range MNL %d\n", mnl);
 		goto out_fail;
 	} else
-		strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl);
+		strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl + 1);
 
 	for (i = 0; i < e->sad_count; i++) {
 		if (ELD_FIXED_BYTES + mnl + 3 * (i + 1) > size) {


More information about the Alsa-devel mailing list