commit
e3a42e011e
@ -52,7 +52,7 @@ static int func_hardware_id_format(IUDEVICE* pdev, char(*HardwareIds)[DEVICE_HAR
|
||||
|
||||
sprintf(str, "USB\\VID_%04X&PID_%04X", idVendor, idProduct);
|
||||
strcpy(HardwareIds[1], str);
|
||||
sprintf(str, "%s&REV_%04X", str, bcdDevice);
|
||||
sprintf(str, "%s&REV_%04X", HardwareIds[1], bcdDevice);
|
||||
strcpy(HardwareIds[0], str);
|
||||
|
||||
return 0;
|
||||
@ -71,18 +71,18 @@ static int func_compat_id_format(IUDEVICE* pdev, char (*CompatibilityIds)[DEVICE
|
||||
{
|
||||
sprintf(str, "USB\\Class_%02X", bDeviceClass);
|
||||
strcpy(CompatibilityIds[2], str);
|
||||
sprintf(str, "%s&SubClass_%02X", str, bDeviceSubClass);
|
||||
sprintf(str, "%s&SubClass_%02X", CompatibilityIds[2], bDeviceSubClass);
|
||||
strcpy(CompatibilityIds[1], str);
|
||||
sprintf(str, "%s&Prot_%02X", str, bDeviceProtocol);
|
||||
sprintf(str, "%s&Prot_%02X", CompatibilityIds[1], bDeviceProtocol);
|
||||
strcpy(CompatibilityIds[0], str);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(str, "USB\\DevClass_00");
|
||||
strcpy(CompatibilityIds[2], str);
|
||||
sprintf(str, "%s&SubClass_00", str);
|
||||
sprintf(str, "%s&SubClass_00", CompatibilityIds[2]);
|
||||
strcpy(CompatibilityIds[1], str);
|
||||
sprintf(str, "%s&Prot_00", str);
|
||||
sprintf(str, "%s&Prot_00", CompatibilityIds[1]);
|
||||
strcpy(CompatibilityIds[0], str);
|
||||
}
|
||||
|
||||
|
@ -909,6 +909,7 @@ static void map_ensure_capacity(wfClipboard* clipboard)
|
||||
int new_size;
|
||||
formatMapping *new_map;
|
||||
|
||||
new_size = clipboard->map_capacity * 2;
|
||||
new_map = (formatMapping*) realloc(clipboard->format_mappings,
|
||||
sizeof(formatMapping) * new_size);
|
||||
if (!new_map)
|
||||
|
@ -688,6 +688,7 @@ rdpRsaKey* key_new(const char* keyfile)
|
||||
|
||||
fread((void*) buffer, length, 1, fp);
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
|
||||
bio = BIO_new_mem_buf((void*) buffer, length);
|
||||
|
||||
|
@ -731,7 +731,10 @@ BOOL TsProxyAuthorizeTunnelReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
packetResponse = (PTSG_PACKET_RESPONSE) calloc(1, sizeof(TSG_PACKET_RESPONSE));
|
||||
|
||||
if (!packetResponse)
|
||||
{
|
||||
free(packet);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
packet->tsgPacket.packetResponse = packetResponse;
|
||||
Pointer = *((UINT32*) &buffer[offset + 8]); /* PacketResponsePtr (4 bytes) */
|
||||
@ -881,7 +884,10 @@ BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
packetMsgResponse = (PTSG_PACKET_MSG_RESPONSE) calloc(1, sizeof(TSG_PACKET_MSG_RESPONSE));
|
||||
|
||||
if (!packetMsgResponse)
|
||||
{
|
||||
free(packet);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
packet->tsgPacket.packetMsgResponse = packetMsgResponse;
|
||||
Pointer = *((UINT32*) &buffer[offset + 8]); /* PacketMsgResponsePtr (4 bytes) */
|
||||
@ -896,7 +902,10 @@ BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
packetStringMessage = (PTSG_PACKET_STRING_MESSAGE) calloc(1, sizeof(TSG_PACKET_STRING_MESSAGE));
|
||||
|
||||
if (!packetStringMessage)
|
||||
return FALSE;
|
||||
{
|
||||
status = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
packetMsgResponse->messagePacket.consentMessage = packetStringMessage;
|
||||
Pointer = *((UINT32*) &buffer[offset + 28]); /* ConsentMessagePtr (4 bytes) */
|
||||
@ -916,7 +925,10 @@ BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
packetStringMessage = (PTSG_PACKET_STRING_MESSAGE) calloc(1, sizeof(TSG_PACKET_STRING_MESSAGE));
|
||||
|
||||
if (!packetStringMessage)
|
||||
return FALSE;
|
||||
{
|
||||
status = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
packetMsgResponse->messagePacket.serviceMessage = packetStringMessage;
|
||||
Pointer = *((UINT32*) &buffer[offset + 28]); /* ServiceMessagePtr (4 bytes) */
|
||||
@ -936,7 +948,10 @@ BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
packetReauthMessage = (PTSG_PACKET_REAUTH_MESSAGE) calloc(1, sizeof(TSG_PACKET_REAUTH_MESSAGE));
|
||||
|
||||
if (!packetReauthMessage)
|
||||
return FALSE;
|
||||
{
|
||||
status = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
packetMsgResponse->messagePacket.reauthMessage = packetReauthMessage;
|
||||
Pointer = *((UINT32*) &buffer[offset + 28]); /* ReauthMessagePtr (4 bytes) */
|
||||
@ -952,6 +967,7 @@ BOOL TsProxyMakeTunnelCallReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
if (packet)
|
||||
{
|
||||
if (packet->tsgPacket.packetMsgResponse)
|
||||
|
@ -350,6 +350,7 @@ LPCH MergeEnvironmentStrings(PCSTR original, PCSTR merge)
|
||||
free(mergeStrings);
|
||||
return NULL;
|
||||
}
|
||||
mergeStrings = new_str;
|
||||
}
|
||||
|
||||
mergeStrings[mergeStringLength] = cp;
|
||||
|
Loading…
Reference in New Issue
Block a user