VirtualBox

Changeset 19541 in vbox


Ignore:
Timestamp:
May 8, 2009 8:10:15 PM (16 years ago)
Author:
vboxsync
Message:

GuestHost/SharedClipboard/x11: fixes to the testcase

File:
1 edited

Legend:

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

    r19540 r19541  
    16151615        AssertReturn(!(text_prop->value[i] & 0x80), XConverterNotFound);
    16161616    char **ppList = (char **)RTMemAlloc(sizeof(char *));
    1617     char *pValue = (char *)RTMemDup(text_prop->value, text_prop->nitems + 1);
     1617    char *pValue = (char *)RTMemAlloc(text_prop->nitems + 1);
     1618    if (pValue)
     1619    {
     1620        memcpy(pValue, text_prop->value, text_prop->nitems);
     1621        pValue[text_prop->nitems] = 0;
     1622    }
    16181623    if (ppList)
    16191624        *ppList = pValue;
     
    17311736        /* Otherwise this is probably a caller error. */
    17321737        Assert(target != g_selTarget);
    1733         callback(NULL, closure, &selection, &type, NULL, &count, &format);
     1738        callback(widget, closure, &selection, &type, NULL, &count, &format);
    17341739                /* Could not convert to target. */
    17351740        return;
     
    17561761        format = 0;
    17571762    }
    1758     callback(NULL, closure, &selection, &type, pValue,
     1763    callback(widget, closure, &selection, &type, pValue,
    17591764             &count, &format);
    17601765}
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