VirtualBox

Changeset 65529 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jan 31, 2017 8:00:40 AM (8 years ago)
Author:
vboxsync
Message:

USB: bugref:8752 Fix USBLibPurgeEncoding and always purge the device strings when creating a filter in userspace too to match what the driver presents to the filter manager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/usblib.h

    r60241 r65529  
    124124 * @returns String length (excluding terminator).
    125125 * @param   psz                 The string to purge.
     126 *
     127 * @remarks The return string may be shorter than the input, left over space
     128 *          after the end of the string will be filled with zeros.
    126129 */
    127130DECLINLINE(size_t) USBLibPurgeEncoding(char *psz)
     
    156159                        break;
    157160                }
     161
     162                /* Wind back to the zero terminator and zero fill any gap to make
     163                   USBFilterValidate happy.  (offSrc is at zero terminator too.) */
     164                offDst--;
     165                while (offSrc > offDst)
     166                    psz[offSrc--] = '\0';
     167
    158168                return offDst;
    159169            }
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