| Server IP : 82.208.35.60 / Your IP : 216.73.217.39 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/graphics/plotutils/files/ |
Upload File : |
--- libplot/x_afftext.c.orig 2008-07-16 00:54:10 UTC
+++ libplot/x_afftext.c
@@ -185,7 +185,10 @@ XAffCreateAffinedText (Display *dpy, XFontStruct *font
/* invert transformation matrix */
det = aa[0] * aa[3] - aa[1] * aa[2];
if (det == 0.0)
+ {
+ free(afftext);
return NULL; /* don't support singular matrices */
+ }
a_inverse[0] = aa[3] / det;
a_inverse[1] = - aa[1] / det;
a_inverse[2] = - aa[2] / det;
@@ -205,7 +208,10 @@ XAffCreateAffinedText (Display *dpy, XFontStruct *font
/* paranoia */
if (size_in.x == 0 || size_in.y == 0)
+ {
+ free(afftext);
return NULL;
+ }
/* work around a possible bug: some X displays can't create pixmaps that
are only one pixel wide or high */
@@ -238,7 +244,10 @@ XAffCreateAffinedText (Display *dpy, XFontStruct *font
/* create local image */
im_in = XAffCreateXImage (dpy, size_in);
if (im_in == NULL)
+ {
+ free(afftext);
return NULL;
+ }
/* copy bitmap to it */
XGetSubImage (dpy, bitmap_in, 0, 0, size_in.x, size_in.y,
@@ -308,7 +317,10 @@ XAffCreateAffinedText (Display *dpy, XFontStruct *font
/* create 2nd image, to hold affinely transformed text */
im_out = XAffCreateXImage (dpy, size_out);
if (im_out == NULL)
+ {
+ free(afftext);
return NULL;
+ }
/* copy from 1st image to this new one */