VirtualBox

Ignore:
Timestamp:
Aug 24, 2016 7:49:10 AM (8 years ago)
Author:
vboxsync
Message:

NAT/TFTP: avoid writing 64-bit size_t to a 32-bit int.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/tftp.c

    r63562 r63621  
    512512    if (pcbReadData)
    513513    {
     514        size_t cbRead;
     515
    514516        rc = RTFileSeek(hSessionFile,
    515517                        pcTftpSession->cbTransfered,
     
    522524            return rc;
    523525        }
    524         rc = RTFileRead(hSessionFile, pu8Data, u16BlkSize, (size_t *)pcbReadData);
     526        rc = RTFileRead(hSessionFile, pu8Data, u16BlkSize, &cbRead);
    525527        if (RT_FAILURE(rc))
    526528        {
     
    529531            return rc;
    530532        }
     533        *pcbReadData = (int)cbRead;
    531534    }
    532535
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette