dll: GlobalDevicePath: bug fix

This commit is contained in:
Bill Zissimopoulos 2015-12-15 19:04:45 -08:00
parent 99b4734d74
commit 8f188914cd

View File

@ -20,7 +20,7 @@ static inline VOID GlobalDevicePath(PWCHAR DevicePathBuf, SIZE_T DevicePathSize,
if (RootSize + PathSize <= DevicePathSize) if (RootSize + PathSize <= DevicePathSize)
{ {
memcpy(DevicePathBuf, DeviceRoot, RootSize); memcpy(DevicePathBuf, DeviceRoot, RootSize);
memcpy(DevicePathBuf + RootSize, DevicePath, PathSize); memcpy((PUINT8)DevicePathBuf + RootSize, DevicePath, PathSize);
} }
else else
/* we should be doing assert(sizeof(WCHAR) <= DevicePathSize), but we don't have assert! */ /* we should be doing assert(sizeof(WCHAR) <= DevicePathSize), but we don't have assert! */