diff options
author | Keith Packard <keithp@keithp.com> | 2008-03-21 02:35:28 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-11-24 13:24:40 -0800 |
commit | fa6a1df209bd74da1d545982cca437afc2198cc1 (patch) | |
tree | 0c77e01812184e135e574380c04abfcbb039f044 /render/picturestr.h | |
parent | 6fe9c15731be5f5afabacb3aa3ed71b840f4238b (diff) |
Avoid overflow in PictureTransformPoint. Fix PictureTransformIsIdentity.
PictureTransformPoint computes homogeneous coordinates internally, but fails
to handle intermediate values larger than 16.16. Use 64 bit intermediate
values while computing the final result at 16.16 and only complain if that
result is too large.
PictureTransformIsIdentity was completely wrong -- it was not checking for
identity transforms at all.
Diffstat (limited to 'render/picturestr.h')
-rw-r--r-- | render/picturestr.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/render/picturestr.h b/render/picturestr.h index b18f3168c..4a7b6e754 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -734,13 +734,10 @@ Bool PictureTransformIsIdentity(PictTransform *t); Bool -PictureTransformIsUnit(PictTransform *t); - -Bool PictureTransformIsScale(PictTransform *t); Bool -PictureTransformIsTranslate (PictTransform *t); +PictureTransformIsIntTranslate (PictTransform *t); Bool PictureTransformIsInverse(PictTransform *t, PictTransform *i); |