diff mbox series

[09/28] edid-decode: update Microsoft expected length

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

Commit Message

joevt Sept. 24, 2021, 11:31 p.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 d6c797d..ea55c99 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -2249,7 +2249,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;
 		}