VirtualBox

Changeset 82840 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 23, 2020 9:36:40 AM (5 years ago)
Author:
vboxsync
Message:

IPRT/FTP: Make sure to only add allowed (supported) FS entries to collections. bugref:9646

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/ftp-server.cpp

    r82839 r82840  
    15521552    }
    15531553
     1554    /* Anything else besides files and directores is not allowed; just don't show them at all for the moment. */
     1555    switch (pInfo->Attr.fMode & RTFS_TYPE_MASK)
     1556    {
     1557        case RTFS_TYPE_DIRECTORY:
     1558            RT_FALL_THROUGH();
     1559        case RTFS_TYPE_FILE:
     1560            break;
     1561
     1562        default:
     1563            return VINF_SUCCESS;
     1564    }
     1565
    15541566    /* Make sure there is space in the collection for the new entry. */
    15551567    if (pCollection->cEntries >= pCollection->cEntriesAllocated)
     
    22822294    {
    22832295        LogFlowFunc(("Handling command '%s'\n", papszArgs[0]));
     2296        for (uint8_t a = 0; a < cArgs; a++)
     2297            LogFlowFunc(("\targ[%RU8] = '%s'\n", a, papszArgs[a]));
    22842298
    22852299        unsigned i = 0;
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