I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
20 lines
640 B
Diff
20 lines
640 B
Diff
--- sys/dev/vt/vt_font.c.orig
|
|
+++ sys/dev/vt/vt_font.c
|
|
@@ -42,6 +42,7 @@
|
|
|
|
/* Some limits to prevent abnormal fonts from being loaded. */
|
|
#define VTFONT_MAXMAPPINGS 65536
|
|
+#define VTFONT_MAXGLYPHS 131072
|
|
#define VTFONT_MAXGLYPHSIZE 2097152
|
|
#define VTFONT_MAXDIMENSION 128
|
|
|
|
@@ -171,7 +172,8 @@
|
|
/* Make sure the dimensions are valid. */
|
|
if (f->width < 1 || f->height < 1)
|
|
return (EINVAL);
|
|
- if (f->width > VTFONT_MAXDIMENSION || f->height > VTFONT_MAXDIMENSION)
|
|
+ if (f->width > VTFONT_MAXDIMENSION || f->height > VTFONT_MAXDIMENSION ||
|
|
+ f->glyph_count > VTFONT_MAXGLYPHS)
|
|
return (E2BIG);
|
|
|
|
/* Not too many mappings. */
|