[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH] Fix type mismatch



The size of PWCHAR and the size of ULONG are the same for 32-bit
installations so this bug only affects 64-bit installations, but the
symptom is a crash on PDO destruction due to a corrupted heap.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenbus/pdo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xenbus/pdo.c b/src/xenbus/pdo.c
index 1ee35f8..495cf12 100644
--- a/src/xenbus/pdo.c
+++ b/src/xenbus/pdo.c
@@ -362,7 +362,7 @@ PdoAddRevision(
     if (Pdo->Description != NULL) {
         RtlCopyMemory(Buffer,
                       Pdo->Description,
-                      sizeof (ULONG) * Pdo->Count);
+                      sizeof (PWCHAR) * Pdo->Count);
         __PdoFree(Pdo->Description);
     }
 
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.