mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 19:37:15 +00:00
#172700 NS_ConvertUTF8ToUCS2() surrogates buffer overflow
allocate enough space for surrogate. p=jgmyers, r=shanjian, sr=dbaron, a=blizzard
This commit is contained in:
parent
f9d3e11926
commit
56103cc0a9
@ -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