Make encrypted ticket size more realistic.

merge-requests/21/head
Mr_Goldberg 2019-08-17 18:00:31 -04:00
parent 7af2d08388
commit e044205e71
No known key found for this signature in database
GPG Key ID: 8597D87419DEF278
1 changed files with 7 additions and 2 deletions

View File

@ -373,11 +373,16 @@ SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToIncl
// retrieve a finished ticket
bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket )
{
PRINT_DEBUG("Steam_User::GetEncryptedAppTicket\n");
PRINT_DEBUG("Steam_User::GetEncryptedAppTicket %i\n", cbMaxTicket);
if (!pcbTicket || !pTicket) return false;
if (encrypted_app_ticket.size() < cbMaxTicket) cbMaxTicket = encrypted_app_ticket.size();
unsigned int ticket_size = encrypted_app_ticket.size() + 126;
//TODO figure out exact sizes?
if (ticket_size < cbMaxTicket) cbMaxTicket = ticket_size;
char ticket_base[] = {0x08, 0x01};
memset(pTicket, 'g', cbMaxTicket);
memcpy(pTicket, ticket_base, sizeof(ticket_base));
*pcbTicket = cbMaxTicket;
return true;
}