Skip to content
Snippets Groups Projects
Commit a88bb190 authored by Luigi Scarso's avatar Luigi Scarso
Browse files

In read_tfm_info avoid scaling fonts to >= 2048pt, which can cause overflow (TeXLive rev. 73614)

parent b9eec3c6
No related branches found
No related tags found
No related merge requests found
2025-01-19 Luigi Scarso <luigi.scarso@gmail.com>
2025-01-31 Luigi Scarso <luigi.scarso@gmail.com>
* In read_tfm_info avoid scaling fonts to >= 2048pt, which can cause overflow (TeXLive rev. 73614)
* \ignoreprimitiveerror as in pdftex
2025-01-19 Luigi Scarso <luigi.scarso@gmail.com>
* Fixed \shapemode does not reset at end of paragraphs (thanks to udifoglle@gmail.com)
......
......@@ -849,7 +849,21 @@ int read_tfm_info(internal_font_number f, const char *cnom, scaled s)
/*tex Read the arrays before the character info. */
set_font_dsize(f, z);
if (s != -1000) {
boolean saved_arith_error = arith_error;
scaled sw = z;
arith_error = false;
z = (s >= 0 ? s : xn_over_d(z, -s, 1000));
if ((arith_error) || (z>= 01000000000)) {
char err[256];
const char *errhelp[] = {
"I will ignore the scaling factor.",
NULL
};
snprintf(err, 255, "Font scaled to 2048pt or higher");
tex_error(err, errhelp);
}
z = sw ;
arith_error = saved_arith_error;
}
set_font_size(f, z);
if (np > 7) {
......
#ifndef luatex_svn_revision_h
#define luatex_svn_revision_h
#define luatex_svn_revision 7646
#define luatex_svn_revision 7647
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment