VirtualBox

Changeset 51791 in vbox


Ignore:
Timestamp:
Jul 1, 2014 8:33:39 PM (10 years ago)
Author:
vboxsync
Message:

Paranoia fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/base64.cpp

    r51790 r51791  
    240240    {
    241241        /* The first 6-bit group. */
    242         while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE)
     242        while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? (uint8_t)*pszString : 0]) == BASE64_SPACE)
    243243            pszString++, cchStringMax--;
    244244        if (u8 >= 64)
     
    252252
    253253        /* The second 6-bit group. */
    254         while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE)
     254        while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? (uint8_t)*pszString : 0]) == BASE64_SPACE)
    255255            pszString++, cchStringMax--;
    256256        if (u8 >= 64)
     
    266266        /* The third 6-bit group. */
    267267        u8 = BASE64_INVALID;
    268         while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE)
     268        while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? (uint8_t)*pszString : 0]) == BASE64_SPACE)
    269269            pszString++, cchStringMax--;
    270270        if (u8 >= 64)
     
    280280        /* The fourth 6-bit group. */
    281281        u8 = BASE64_INVALID;
    282         while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE)
     282        while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? (uint8_t)*pszString : 0]) == BASE64_SPACE)
    283283            pszString++, cchStringMax--;
    284284        if (u8 >= 64)
     
    311311        pszString++;
    312312        cchStringMax--;
    313         while (cchStringMax > 0 && (ch = *pszString))
     313        while (cchStringMax > 0 && (ch = (uint8_t)*pszString))
    314314        {
    315315            u8 = g_au8CharToVal[ch];
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