Changeset e02b20a3 in rtems


Ignore:
Timestamp:
Mar 22, 2015, 7:59:14 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
2e9c3d5
Parents:
0771936e
git-author:
Joel Sherrill <joel.sherrill@…> (03/22/15 19:59:14)
git-committer:
Joel Sherrill <joel.sherrill@…> (03/24/15 13:17:13)
Message:

cpukit/libmisc/utf8proc/utf8proc.c: Avoid overflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/utf8proc/utf8proc.c

    r0771936e re02b20a3  
    146146    break;
    147147    case 4:
     148#if defined(__rtems__)
     149    uc = (((int32_t)str[0] & 0x07) << 18) + (((int32_t)str[1] & 0x3F) << 12)
     150      + (((int32_t)str[2] & 0x3F) <<  6) + (str[3] & 0x3F);
     151#else
    148152    uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12)
    149153      + ((str[2] & 0x3F) <<  6) + (str[3] & 0x3F);
     154#endif
    150155    if (uc < 0x10000 || uc >= 0x110000) uc = -1;
    151156    break;
Note: See TracChangeset for help on using the changeset viewer.