Skip to content

Commit

Permalink
zzz
Browse files Browse the repository at this point in the history
  • Loading branch information
matt335672 committed Mar 4, 2024
1 parent 38e02be commit 5688f16
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions sesman/chansrv/smartcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,6 @@ out_redir_scardhandle_part1(struct stream *s,
unsigned int *referent_id)
{
out_redir_scardcontext_part1(s, &hCard->Context, referent_id);
*referent_id += REFERENT_ID_INC;
// Will already be aligned on a 4-boundary
out_uint32_le(s, hCard->cbHandle);
out_uint32_le(s, *referent_id);
Expand Down Expand Up @@ -2285,40 +2284,40 @@ scard_send_Transmit(struct stream *s, struct transmit_call *call_data,
unsigned int ref_id = REFERENT_ID_BASE; /* Next referent ID to use */

s_push_layer(s, mcs_hdr, 4); /* bytes, set later */
out_uint32_be(s, 0x00000000);
out_uint32_le(s, 0x00000000);

// REDIR_SCARDHANDLE hCard;
out_redir_scardhandle_part1(s, hCard, &ref_id);
// SCardIO_Request ioSendPci;
out_scard_io_request_part1(s, call_data->pioSendPci, &ref_id);

// [range(0,66560)] unsigned long cbSendLength;
out_uint32_be(s, call_data->cbSendLength);
out_uint32_le(s, call_data->cbSendLength);
// [size_is(cbSendLength)] const byte* pbSendBuffer;
// This could be empty - check for that.
if (call_data->cbSendLength > 0)
{
out_uint32_be(s, ref_id);
out_uint32_le(s, ref_id);
ref_id += REFERENT_ID_INC;
}
else
{
out_uint32_be(s, 0);
out_uint32_le(s, 0);
}
// [unique] SCardIO_Request* pioRecvPci;
if (call_data->pioRecvPci != NULL)
{
out_uint32_be(s, ref_id);
out_uint32_le(s, ref_id);
ref_id += REFERENT_ID_INC;
}
else
{
out_uint32_be(s, 0);
out_uint32_le(s, 0);
}
// long fpbRecvBufferIsNULL;
out_uint32_be(s, call_data->retrieve_length_only);
out_uint32_le(s, call_data->retrieve_length_only);
// unsigned long cbRecvLength;
out_uint32_be(s, call_data->cbRecvLength);
out_uint32_le(s, call_data->cbRecvLength);

// Now output all the pointed-to data
out_redir_scardhandle_part2(s, hCard);
Expand All @@ -2327,7 +2326,7 @@ scard_send_Transmit(struct stream *s, struct transmit_call *call_data,
out_align_s(s, 4);
if (call_data->cbSendLength > 0)
{
out_uint32_be(s, call_data->cbSendLength);
out_uint32_le(s, call_data->cbSendLength);
out_uint8a(s, call_data->pbSendBuffer, call_data->cbSendLength);
}

Expand Down

0 comments on commit 5688f16

Please sign in to comment.