The FreeType Project - Bugs: bug #54019, A value overflows, resulting in a...
You are not allowed to post comments on this tracker with your current authentication level.
bug #54019: A value overflows, resulting in a large loop
Submitter: | lonely <flywrongsnow> | ||
Submitted: | Thu 31 May 2018 06:36:20 AM UTC | ||
Severity: | 3 - Normal | Item Group: | Incorrect behaviour |
Status: | Fixed | Privacy: | Public |
Assigned to: | wl | Open/Closed: | Closed |
Planned Release: | 2.10.0 |
Jump to the original submission
Sun 24 Jun 2018 08:01:42 PM UTC, comment #18: |
Werner LEMBERG <wl> |
Sun 24 Jun 2018 05:30:59 PM UTC, comment #17: Thanks for picking up the slack! Is there any reason why you do not want to fall back on default in t1/t42/cid fonts? Do these fonts specify the upem through the font matrix only? |
Alexei Podtelezhnikov <podtelez> |
Sun 24 Jun 2018 04:29:42 AM UTC, comment #16: I've now added an `FT_Check_Matrix' function to FreeType to find degenerate matrices.
|
Werner LEMBERG <wl> |
Wed 06 Jun 2018 09:37:32 PM UTC, comment #15:
^
|
Werner LEMBERG <wl> |
Wed 06 Jun 2018 07:47:55 PM UTC, comment #14: I was thinking about rejecting degenerate transformations at some point too, xx*yy - xy*yx = 0. Now that you mention extreme shear we might consider this as unacceptable
|
Alexei Podtelezhnikov <podtelez> |
Wed 06 Jun 2018 03:35:21 PM UTC, comment #13: Hmm. Do you think that, say,
|
Werner LEMBERG <wl> |
Wed 06 Jun 2018 02:57:53 PM UTC, comment #12: The typical font matrix [0.001 0 0 0.001 0 0] scales font units down to Em units. I would say that scaling up here is not very practical. I think we should should fall back on the default matrix anytime we see values exceeding 1 in the first four elements. |
Alexei Podtelezhnikov <podtelez> |
Wed 06 Jun 2018 06:23:58 AM UTC, comment #11: Thanks for the timings. I wasn't aware that JPEG is limited to a maximum size of 0xFFFF×0xFFFF – I've now added guards to both the gray and B/W rasterizer.
|
Werner LEMBERG <wl> |
Tue 05 Jun 2018 07:12:12 PM UTC, comment #10: I dunno. Here is the ftbench summaries with horizontal and vertical bisections respectively:
|
Alexei Podtelezhnikov <podtelez> |
Tue 05 Jun 2018 05:39:19 AM UTC, comment #9: Hmm. Using the PFB test font attached to this issue, I don't see much difference in calling `ftview 100 <font>'. It still takes a veeery long time to load. |
Werner LEMBERG <wl> |
Sun 03 Jun 2018 01:46:31 AM UTC, comment #8: I tried to mitigate this. Please test. |
Alexei Podtelezhnikov <podtelez> |
Fri 01 Jun 2018 05:07:40 AM UTC, comment #7:
|
Werner LEMBERG <wl> |
Thu 31 May 2018 08:54:27 PM UTC, comment #6: A large loop or an endless loop? Why aren't checks in ftgrays.c:1890 sufficient? This is indeed the place to make the checks tighter is necessary. |
Alexei Podtelezhnikov <podtelez> |
Thu 31 May 2018 08:34:35 PM UTC, comment #5: Oh, similar ideas could be applied to the Type1 font matrix. |
Werner LEMBERG <wl> |
Thu 31 May 2018 08:33:12 PM UTC, comment #4: Don't use version 2.9, use 2.9.1!
|
Werner LEMBERG <wl> |
Thu 31 May 2018 09:43:05 AM UTC, comment #3: I'm not good at fonts. I just found there is something unnormal.
|
lonely <flywrongsnow> |
Thu 31 May 2018 09:08:17 AM UTC, comment #2: OK, I had a look, and I'm not sure whether this qualifies as a bug at all. The subsetted font `Helvetica-Condensed-Light' (attached for convenience) contains an invalid font matrix entry which causes an extremely large horizontal shearing. Consequently, FreeType rasters glyphs having dimensions like 163851x5px, which doesn't make much sense but is valid. Note that such an array can easily be allocated, and rendering works fine also. Many glyphs in this font, however, are already rejected because some point coordinates are too large (cf. lines 1890ff in file `src/smooth/ftgrays.c').
|
Werner LEMBERG <wl> |
Thu 31 May 2018 07:21:03 AM UTC, comment #1: Before I look into this: Please retry with current FreeType version (2.9.1.). |
Werner LEMBERG <wl> |
Thu 31 May 2018 06:36:20 AM UTC, original submission:
when I add the code below after the function ft_glyphslot_preset_bitmap() in function ft_smooth_render_generic() according to version 2.7.1,the loop is stop.
|
lonely <flywrongsnow> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-06-24 | wl | Status | Confirmed | Fixed | |
Open/Closed | Open | Closed | |||
Planned Release | None | 2.10.0 | |||
2018-06-06 | wl | Status | Ready For Test | Confirmed | |
2018-06-03 | podtelez | Status | Need Info | Ready For Test | |
2018-05-31 | wl | Attached File | - | Added Helvetica-Condensed-Light-buggy.pfb, #44257 | |
Carbon-Copy | - | Added apodtele | |||
2018-05-31 | wl | Status | None | Need Info | |
Assigned to | None | wl | |||
2018-05-31 | flywrongsnow | Attached File | - | Added 0015491_cp800datasheet.pdf, #44252 |
Powered by Savane 3.13-d3ae.
Corresponding source code
No specific reason – I simply updated the code. Feel free to add a fallback matrix :-)