https://git.reactos.org/?p=reactos.git;a=commitdiff;h=01a10da73d8281fc77865…
commit 01a10da73d8281fc77865d751d62369c28e13772
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Dec 9 13:42:44 2024 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Mon Dec 9 13:42:44 2024 +0100
[VIDEOPRT] VideoPortInitialize(): Display the invalid and expected struct sizes on
error
---
win32ss/drivers/videoprt/videoprt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/win32ss/drivers/videoprt/videoprt.c b/win32ss/drivers/videoprt/videoprt.c
index 97c5290b76f..53e158ab695 100644
--- a/win32ss/drivers/videoprt/videoprt.c
+++ b/win32ss/drivers/videoprt/videoprt.c
@@ -794,7 +794,11 @@ VideoPortInitialize(
break;
default:
- ERR_(VIDEOPRT, "Invalid HwInitializationData size.\n");
+ ERR_(VIDEOPRT, "Invalid HwInitializationData size %lu (expected %lu, %lu
or %lu)\n",
+ HwInitializationData->HwInitDataSize,
+ SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA,
+ SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA,
+ sizeof(VIDEO_HW_INITIALIZATION_DATA));
return STATUS_UNSUCCESSFUL;
}