freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Two patches (Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of goo


From: Hin-Tak Leung
Subject: Two patches (Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts))
Date: Thu, 25 May 2023 14:50:19 +0000 (UTC)

Hi Werner,

The patches should be self-explanatory - includng another one for the 
deprecation warnings too.

I am wondering about whether having something like the below too, but now that 
the actual problem is properly addressed, I don't feel too strongly about 
having such a band aid.

Hin-Tak

@@ -350,6 +350,14 @@
     cairo_recording_surface_ink_extents( state->rec_surface, &x, &y,
                                          &width, &height );
 
+    if (( width > 10000 ) || ( height > 10000 )) /* arbitrary large numbers */
+    {
+      fprintf(stderr, "cairo_recording_surface_ink_extents returns very large 
%dx%d bitmap\n",
+              width, height);
+      return FT_Err_Out_Of_Memory;
+      goto CleanCairo;
+    }
+
     /* We store the bounding box's `x` and `y` values so that the render */
     /* hook can apply a translation to get a tight rendering.            */
     state->x = x;

Attachment: 0001-src-rsvg-port.c-Fix-deprecation-warnings-against-lib.patch
Description: Text Data

Attachment: 0002-src-rsvg-port.c-Fix-out-of-memory-conditions-with-ne.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]