Previously t1_aa was initialized to 0, the same as the non-AA setting,
which meant if the first text drawn was non-AA that T1 anti-aliasing
hadn't been configured.
Initialize it to -1, an invalid anti-aliasing setting so that an initial
AA setting of "none" will properly initialize.
image, or possibly to a segmentation fault.
I don't believe this has any security concerns beyond that.
+ - if the first text drawn with Imager::Font::T1 is not anti-aliased,
+ text drawn would be nonsense. This would also read beyond the end
+ of a malloced buffer.
+
Imager 0.97 - 15 Jul 2013
===========
+Imager::Font::T1 1.023
+======================
+
+ - if the first text drawn with Imager::Font::T1 is not anti-aliased,
+ text drawn would be nonsense. This would also read beyond the end
+ of a malloced buffer.
+
Imager::Font::T1 1.022
======================
use Scalar::Util ();
BEGIN {
- $VERSION = "1.022";
+ $VERSION = "1.023";
require XSLoader;
XSLoader::load('Imager::Font::T1', $VERSION);
static int t1_active_fonts = 0;
static int t1_initialized = 0;
-static int t1_aa = 0;
+static int t1_aa = -1;
struct i_t1_font_tag {
int font_id;
int i;
unsigned long cst[17];
+ mm_log((1, "i_t1_set_aa(%d)\n", st));
+
if (t1_aa == st)
return;