diff mbox series

[v2,09/29] edid-decode: update Microsoft expected length

Message ID 20210926083330.5206-10-joevt@shaw.ca (mailing list archive)
State New, archived
Headers show
Series edid-decode: bug fixes, additions, changes | expand

Commit Message

joevt Sept. 26, 2021, 8:33 a.m. UTC
Since we excluded the size of the OUI from the length in a previous commit, we need to decrease the expected length accordingly.
See example DELA07B/5F1B08ADB0A0, LENB800/61B4B713B745

Really, length checks should probably be done in the parse function. If length is greater than expected then parse up to the expected length and output the rest as hex with a warning. If length is less than expected then parse up to the length and warn that some expected bytes are missing.

Signed-off-by: Joe van Tunen <joevt@shaw.ca>
---
 parse-cta-block.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
index fb2e9ea..3b6126a 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -2285,7 +2285,7 @@  void edid_state::cta_block(const unsigned char *x, bool duplicate)
 			cta_amd(x, length);
 			break;
 		}
-		if (oui == 0xca125c && length == 0x15) {
+		if (oui == 0xca125c && length == 0x12) {
 			cta_microsoft(x, length);
 			break;
 		}