From 5273604dac6200a03d2d044254f0b7006b077688 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 1 Aug 2018 09:56:14 +0200 Subject: [PATCH] Fix EDID parsing: strings can be 13 bytes The spec gives 13 bytes (5 header, 13 data in increments of 18). Change-Id: I059590cd750ac403a1f3b44b5f9a0ee300cff5b5 Reviewed-by: Friedemann Kleint Reviewed-by: Pier Luigi Fiorini --- src/platformsupport/edid/qedidparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platformsupport/edid/qedidparser.cpp b/src/platformsupport/edid/qedidparser.cpp index ccf12e9eb3..1cc16b47f8 100644 --- a/src/platformsupport/edid/qedidparser.cpp +++ b/src/platformsupport/edid/qedidparser.cpp @@ -160,7 +160,7 @@ bool QEdidParser::parse(const QByteArray &blob) QString QEdidParser::parseEdidString(const quint8 *data) { - QByteArray buffer(reinterpret_cast(data), 12); + QByteArray buffer(reinterpret_cast(data), 13); // Erase carriage return and line feed buffer = buffer.replace('\r', '\0').replace('\n', '\0');