1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-02-28 06:13:03 +01:00

cast size_t on read/write to proper result for the TLV

This commit is contained in:
Brent Cook 2015-03-17 15:27:48 -05:00
parent 7c8b723c15
commit 95e102a90c

View File

@ -25,7 +25,7 @@ static DWORD file_channel_write(Channel *channel, Packet *request,
{
FileContext *ctx = (FileContext *)context;
DWORD result= ERROR_SUCCESS;
DWORD written = 0;
size_t written = 0;
// Write a chunk
if (bufferSize) {
@ -36,7 +36,7 @@ static DWORD file_channel_write(Channel *channel, Packet *request,
}
if (bytesWritten) {
*bytesWritten = written;
*bytesWritten = (DWORD)written;
}
return result;
@ -65,7 +65,7 @@ static DWORD file_channel_read(Channel *channel, Packet *request,
{
FileContext *ctx = (FileContext *)context;
DWORD result = ERROR_SUCCESS;
DWORD bytes = 0;
size_t bytes = 0;
// Read a chunk
if (bufferSize) {
@ -76,7 +76,7 @@ static DWORD file_channel_read(Channel *channel, Packet *request,
}
if (bytesRead) {
*bytesRead = bytes;
*bytesRead = (DWORD)bytes;
}
return ERROR_SUCCESS;