VirtualBox

Changeset 84717 in vbox for trunk


Ignore:
Timestamp:
Jun 7, 2020 7:11:56 AM (5 years ago)
Author:
vboxsync
Message:

SharedClipboard/clipboard-x11.cpp: Fix the crashing tstClipboardGH-X11 testcase as it expects a NULL terminated array of supported formats, leave two todos for the author

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r82922 r84717  
    129129    /** @todo Add Wayland / Weston support. */
    130130#endif
    131     { "LAST",                               SHCLX11FMT_INVALID,     VBOX_SHCL_FMT_NONE },
     131    /** @todo r=aeichner The "LAST" in there was causing tstClipboardGH-X11.cpp:XInternAtom to crash because it was reading out side of the array. */
     132    { NULL,                                 SHCLX11FMT_INVALID,     VBOX_SHCL_FMT_NONE },
    132133};
    133134
     
    728729        for (i = 0; i < *pcLen; ++i)
    729730        {
    730             for (j = 0; j < RT_ELEMENTS(g_aFormats); ++j)
     731            for (j = 0; j < RT_ELEMENTS(g_aFormats) - 1; ++j) /** @todo r=aeichner Don't include the last invalid format. */
    731732            {
    732733                Atom target = XInternAtom(XtDisplay(widget),
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