8160695: getHBScriptCode script code validation
Reviewed-by: bpb
This commit is contained in:
parent
b6b66540e4
commit
fd10d046e9
@ -85,7 +85,7 @@ hb_script_t ICU_to_Harfbuzz_ScriptCode[] = {
|
||||
int MAX_ICU_SCRIPTCODE = 45;
|
||||
|
||||
hb_script_t getHBScriptCode(int code) {
|
||||
if (code > MAX_ICU_SCRIPTCODE) {
|
||||
if ((code < 0) || (code > MAX_ICU_SCRIPTCODE)) {
|
||||
return HB_SCRIPT_INVALID;
|
||||
}
|
||||
return ICU_to_Harfbuzz_ScriptCode[code];
|
||||
|
Loading…
x
Reference in New Issue
Block a user