edid: Copy the Manufacturer Code char array to a NULL-term string

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3268>
This commit is contained in:
Sebastian Wick 2023-09-12 20:06:22 +02:00
parent 6d0d69558e
commit 4514d29c90

View File

@ -206,7 +206,7 @@ decode_edid_info (const uint8_t *edid,
vendor_product = di_edid_get_vendor_product (di_edid); vendor_product = di_edid_get_vendor_product (di_edid);
/* Manufacturer Code */ /* Manufacturer Code */
info->manufacturer_code = g_strdup (vendor_product->manufacturer); info->manufacturer_code = g_strndup (vendor_product->manufacturer, 3);
/* Product Code */ /* Product Code */
info->product_code = vendor_product->product; info->product_code = vendor_product->product;