Index: /trunk/src/VBox/Runtime/common/fs/fatvfs.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/fs/fatvfs.cpp	(revision 67877)
+++ /trunk/src/VBox/Runtime/common/fs/fatvfs.cpp	(revision 67878)
@@ -1416,9 +1416,9 @@
 
     if (puDate)
-        *puDate = ((RT_MIN(Time.i32Year, 1980) - 1980) << 9)
+        *puDate = ((uint16_t)(RT_MAX(Time.i32Year, 1980) - 1980) << 9)
                 | (Time.u8Month << 5)
                 | Time.u8MonthDay;
     if (puTime)
-        *puTime = (Time.u8Hour   << 11)
+        *puTime = ((uint16_t)Time.u8Hour   << 11)
                 | (Time.u8Minute << 5)
                 | (Time.u8Second >> 1);
@@ -4929,5 +4929,7 @@
     pBootSector->Bpb.Bpb331.cTracksPerCylinder  = cHeads;
     pBootSector->Bpb.Bpb331.cHiddenSectors      = cHiddenSectors;
-    pBootSector->Bpb.Bpb331.cTotalSectors32     = cTotalSectors <= UINT32_MAX     ? (uint32_t)cTotalSectors : 0;
+    /* XP barfs if both cTotalSectors32 and cTotalSectors16 are set */
+    pBootSector->Bpb.Bpb331.cTotalSectors32     = cTotalSectors <= UINT32_MAX && pBootSector->Bpb.Bpb331.cTotalSectors16 == 0
+                                                ? (uint32_t)cTotalSectors : 0;
     if (enmFatType != RTFSFATTYPE_FAT32)
     {
