]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Fix type mismatch
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 26 Jan 2015 16:15:24 +0000 (16:15 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 26 Jan 2015 16:15:24 +0000 (16:15 +0000)
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@citrix.com>
src/xenvif/pdo.c

index ef5413c96a9050b36d5e4df68d01f3b28188ba5b..a7755d2929e66c78c0aa3fc14c76441e75d1e213 100644 (file)
@@ -564,7 +564,7 @@ PdoAddRevision(
     if (Pdo->Description != NULL) {
         RtlCopyMemory(Buffer,
                       Pdo->Description,
-                      sizeof (ULONG) * Pdo->Count);
+                      sizeof (PWCHAR) * Pdo->Count);
         __PdoFree(Pdo->Description);
     }