[cfe-commits] r167063 - /cfe/trunk/lib/Basic/ConvertUTF.c
Seth Cantrell
seth.cantrell at gmail.com
Tue Oct 30 18:04:34 PDT 2012
r167089
On Oct 30, 2012, at 8:23 PM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
> testcase?
>
> On 30 October 2012 19:50, Seth Cantrell <seth.cantrell at gmail.com> wrote:
>> Author: socantre
>> Date: Tue Oct 30 18:50:26 2012
>> New Revision: 167063
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=167063&view=rev
>> Log:
>> isLegalUTF8() was giving the wrong answer
>>
>> invalid but not caught by isLegalUTF8(): 0xED 0x75 0x84
>>
>> Modified:
>> cfe/trunk/lib/Basic/ConvertUTF.c
>>
>> Modified: cfe/trunk/lib/Basic/ConvertUTF.c
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/ConvertUTF.c?rev=167063&r1=167062&r2=167063&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Basic/ConvertUTF.c (original)
>> +++ cfe/trunk/lib/Basic/ConvertUTF.c Tue Oct 30 18:50:26 2012
>> @@ -359,7 +359,7 @@
>> /* Everything else falls through when "true"... */
>> case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false;
>> case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false;
>> - case 2: if ((a = (*--srcptr)) > 0xBF) return false;
>> + case 2: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false;
>>
>> switch (*source) {
>> /* no fall-through in this inner switch */
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list