Bug 100607

Summary: edid-decode: cea_vfpdb() - incorrect indexing of mode name
Product: xorg Reporter: Simon <simon>
Component: App/edid-decodeAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Simon 2017-04-07 08:34:04 UTC
Hi,
Browsing the code it looks like the 'cea_vfpdb()' function makes an incorrect indexing into the mode name array.

https://cgit.freedesktop.org/xorg/app/edid-decode/tree/edid-decode.c#n828
--
	    vic = svr;
	    index = vic - 1;

	    if (index < ARRAY_SIZE(edid_cea_modes))
		mode = edid_cea_modes[vic];
	    else
		mode = "Unknown mode";
--

Valid VIC will be a value of 1 or greater, that should read:
--
		mode = edid_cea_modes[index];
--

The same array is correctly indexed here:
https://cgit.freedesktop.org/xorg/app/edid-decode/tree/edid-decode.c#n786


Unfortunately I don't have an example EDID with the 'Video Format Preference Data Block (VFPDB)' block to confirm.
Simon.
Comment 1 Alan Coopersmith 2018-08-12 20:43:18 UTC
This was fixed as a side-effect when that code was replaced by vic_to_mode in
https://git.linuxtv.org/edid-decode.git/commit/edid-decode.c?id=011a22eb80f62ff2e2d7dfbf296bb02deb8e5174

Thanks for the report.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.