mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 13:48:02 +02:00
Fix access to uninitialized data
key must be first element in cache entry
This commit is contained in:
parent
2a7a9d00cc
commit
dfee909d51
5 changed files with 16 additions and 4 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2005-01-26 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* src/cairo_ft_font.c: (_ft_unscaled_font_set_scale):
|
||||
Fix access to uninitialized data
|
||||
|
||||
* src/cairo_xlib_surface.c:
|
||||
key must be first element in cache entry
|
||||
|
||||
2005-01-25 David Reveman <davidr@novell.com>
|
||||
|
||||
* AUTHORS: Update mail address.
|
||||
|
|
|
|||
|
|
@ -445,12 +445,14 @@ _ft_unscaled_font_set_scale (ft_unscaled_font_t *unscaled,
|
|||
|
||||
assert (unscaled->face != NULL);
|
||||
|
||||
if (scale->matrix[0][0] == unscaled->current_scale.matrix[0][0] &&
|
||||
if (unscaled->have_scale &&
|
||||
scale->matrix[0][0] == unscaled->current_scale.matrix[0][0] &&
|
||||
scale->matrix[0][1] == unscaled->current_scale.matrix[0][1] &&
|
||||
scale->matrix[1][0] == unscaled->current_scale.matrix[1][0] &&
|
||||
scale->matrix[1][1] == unscaled->current_scale.matrix[1][1])
|
||||
return;
|
||||
|
||||
unscaled->have_scale = 1;
|
||||
unscaled->current_scale = *scale;
|
||||
|
||||
_compute_transform (&sf, scale);
|
||||
|
|
|
|||
|
|
@ -823,10 +823,10 @@ typedef struct glyphset_cache {
|
|||
} glyphset_cache_t;
|
||||
|
||||
typedef struct {
|
||||
int refcount;
|
||||
cairo_glyph_cache_key_t key;
|
||||
Glyph glyph;
|
||||
XGlyphInfo info;
|
||||
int refcount;
|
||||
} glyphset_cache_entry_t;
|
||||
|
||||
static Glyph
|
||||
|
|
|
|||
|
|
@ -445,12 +445,14 @@ _ft_unscaled_font_set_scale (ft_unscaled_font_t *unscaled,
|
|||
|
||||
assert (unscaled->face != NULL);
|
||||
|
||||
if (scale->matrix[0][0] == unscaled->current_scale.matrix[0][0] &&
|
||||
if (unscaled->have_scale &&
|
||||
scale->matrix[0][0] == unscaled->current_scale.matrix[0][0] &&
|
||||
scale->matrix[0][1] == unscaled->current_scale.matrix[0][1] &&
|
||||
scale->matrix[1][0] == unscaled->current_scale.matrix[1][0] &&
|
||||
scale->matrix[1][1] == unscaled->current_scale.matrix[1][1])
|
||||
return;
|
||||
|
||||
unscaled->have_scale = 1;
|
||||
unscaled->current_scale = *scale;
|
||||
|
||||
_compute_transform (&sf, scale);
|
||||
|
|
|
|||
|
|
@ -823,10 +823,10 @@ typedef struct glyphset_cache {
|
|||
} glyphset_cache_t;
|
||||
|
||||
typedef struct {
|
||||
int refcount;
|
||||
cairo_glyph_cache_key_t key;
|
||||
Glyph glyph;
|
||||
XGlyphInfo info;
|
||||
int refcount;
|
||||
} glyphset_cache_entry_t;
|
||||
|
||||
static Glyph
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue