#172700 NS_ConvertUTF8ToUCS2() surrogates buffer overflow
allocate enough space for surrogate. p=jgmyers, r=shanjian, sr=dbaron, a=blizzard git-svn-id: svn://10.0.0.236/trunk@132607 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
64865ebee6
commit
6ca97a5e22
@ -1389,8 +1389,10 @@ class CalculateUTF8Length
|
||||
p += 2;
|
||||
else if ( UTF8traits::is3byte(*p) )
|
||||
p += 3;
|
||||
else if ( UTF8traits::is4byte(*p) )
|
||||
else if ( UTF8traits::is4byte(*p) ) {
|
||||
p += 4;
|
||||
++mLength;
|
||||
}
|
||||
else if ( UTF8traits::is5byte(*p) )
|
||||
p += 5;
|
||||
else if ( UTF8traits::is6byte(*p) )
|
||||
|
||||
@ -1389,8 +1389,10 @@ class CalculateUTF8Length
|
||||
p += 2;
|
||||
else if ( UTF8traits::is3byte(*p) )
|
||||
p += 3;
|
||||
else if ( UTF8traits::is4byte(*p) )
|
||||
else if ( UTF8traits::is4byte(*p) ) {
|
||||
p += 4;
|
||||
++mLength;
|
||||
}
|
||||
else if ( UTF8traits::is5byte(*p) )
|
||||
p += 5;
|
||||
else if ( UTF8traits::is6byte(*p) )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user