| Index: webkit/glue/plugins/pepper_font.cc
|
| ===================================================================
|
| --- webkit/glue/plugins/pepper_font.cc (revision 54766)
|
| +++ webkit/glue/plugins/pepper_font.cc (working copy)
|
| @@ -36,6 +36,7 @@
|
| if (desc.face.type != PP_VARTYPE_STRING && desc.face.type != PP_VARTYPE_VOID)
|
| return false;
|
|
|
| + // Check enum ranges.
|
| if (static_cast<int>(desc.family) < PP_FONTFAMILY_DEFAULT ||
|
| static_cast<int>(desc.family) > PP_FONTFAMILY_MONOSPACE)
|
| return false;
|
| @@ -43,6 +44,10 @@
|
| static_cast<int>(desc.weight) > PP_FONTWEIGHT_900)
|
| return false;
|
|
|
| + // Check for excessive sizes which may cause layout to get confused.
|
| + if (desc.size() > 200)
|
| + return false;
|
| +
|
| return true;
|
| }
|
|
|
|
|