VirtualBox

Changeset 94562 in vbox


Ignore:
Timestamp:
Apr 11, 2022 4:32:01 PM (3 years ago)
Author:
vboxsync
Message:

xpcom/python3: Use PyBytes_FromStringAndSize() instead of PyUnicode_FromStringAndSize to convert binary data to python objects, unicode can't represent arbitrary byte strings, bugref:10214

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/python/src/VariantUtils.cpp

    r93678 r94562  
    632632                return PyString_FromStringAndSize( (char *)array_ptr, sequence_size );
    633633#else
    634                 return PyUnicode_FromStringAndSize( (char *)array_ptr, sequence_size );
     634                return PyBytes_FromStringAndSize( (char *)array_ptr, sequence_size );
    635635#endif
    636636
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