VirtualBox

Changeset 98824 in vbox for trunk/include/VBox/GuestHost


Ignore:
Timestamp:
Mar 2, 2023 5:06:36 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156144
Message:

Guest Control: Made the directory entry reading really dynamic by letting the guest tell us the size it reports to the guest (limited by GSTCTL_DIRENTRY_MAX_SIZE). Re-introduced the #pragma pack(1) because we need the structures on mixed bitness (32 / 64 or vice versa) with the same size. bugref:9783

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/GuestHost/GuestControl.h

    r98820 r98824  
    303303 * Additional Unix Attributes (GSTCTLFSOBJATTRADD_UNIX).
    304304 */
     305#pragma pack(1)
    305306typedef struct GSTCTLFSOBJATTRUNIX
    306307{
     
    344345    RTDEV           Device;
    345346} GSTCTLFSOBJATTRUNIX;
     347#pragma pack()
     348AssertCompileSize(GSTCTLFSOBJATTRUNIX, 36);
    346349
    347350/**
     
    549552typedef GSTCTLDIRENTRYEX const *PCGSTCTLDIRENTRYEX;
    550553
    551 /** The maximum size (in bytes) of a GSTCTLDIRENTRYEX (includes dynamic szName[pDirEntry->cbName + 1]). */
    552 #define GSTCTL_DIRENTRY_MAX_SIZE    (sizeof(GSTCTLDIRENTRYEX) + RTPATH_MAX)
     554/** The maximum size (in bytes) of an entry file name (at least RT_UOFFSETOF(GSTCTLDIRENTRYEX, szName[2]). */
     555#define GSTCTL_DIRENTRY_MAX_SIZE    4096
    553556
    554557} /* namespace guestControl */
Note: See TracChangeset for help on using the changeset viewer.

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