Index: /trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp	(revision 54728)
+++ /trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp	(revision 54729)
@@ -601,8 +601,9 @@
         return STATUS_INSUFFICIENT_RESOURCES;
     }
-
+	
     for (i = 0; i < pCfgDr->bNumInterfaces; i++)
     {
         pIfLe[i].InterfaceDescriptor = USBD_ParseConfigurationDescriptorEx(pCfgDr, pCfgDr, i, 0, -1, -1, -1);
+		pIfLe[i].Interface = NULL;
         if (!pIfLe[i].InterfaceDescriptor)
         {
@@ -612,5 +613,6 @@
         }
     }
-
+	pIfLe[pCfgDr->bNumInterfaces].InterfaceDescriptor = NULL;
+	
     if (NT_SUCCESS(Status))
     {
@@ -659,10 +661,19 @@
                         *pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo = *pIfLe[i].Interface;
 
-                        for (ULONG j = 0; j < pIfLe[i].Interface->NumberOfPipes; j++)
-                        {
-                            pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo->Pipes[j] = pIfLe[i].Interface->Pipes[j];
-                            pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].EndpointAddress = pIfLe[i].Interface->Pipes[j].EndpointAddress;
-                            pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].NextScheduledFrame = 0;
-                        }
+						// AM try/catch for handle citrix case with wrong data from device.
+						__try
+						{
+							for (ULONG j = 0; j < pIfLe[i].Interface->NumberOfPipes; j++)
+							{
+								pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo->Pipes[j] = pIfLe[i].Interface->Pipes[j];
+								pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].EndpointAddress = pIfLe[i].Interface->Pipes[j].EndpointAddress;
+								pDevExt->Rt.pVBIfaceInfo[i].pPipeInfo[j].NextScheduledFrame = 0;
+							}
+						}
+						__except (EXCEPTION_EXECUTE_HANDLER)
+						{
+							Status = GetExceptionCode();
+							break;
+						}
                     }
 
