projects
/
platform
/
upstream
/
pixman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33ac0a9
)
In MUL_UNc() cast to comp2_t
author
Søren Sandmann Pedersen
<ssp@redhat.com>
Tue, 20 Dec 2011 11:34:41 +0000
(06:34 -0500)
committer
Søren Sandmann Pedersen
<ssp@redhat.com>
Mon, 9 Jan 2012 10:40:33 +0000
(
05:40
-0500)
Otherwise, when comp1_t is 16 bits wide, we can end up with a signed
integer overflow.
pixman/pixman-combine.h.template
patch
|
blob
|
history
diff --git
a/pixman/pixman-combine.h.template
b/pixman/pixman-combine.h.template
index
67ed309
..
53afcd2
100644
(file)
--- a/
pixman/pixman-combine.h.template
+++ b/
pixman/pixman-combine.h.template
@@
-25,7
+25,7
@@
*/
#define MUL_UNc(a, b, t) \
- ((t) = (a) * (b) + ONE_HALF, ((((t) >> G_SHIFT ) + (t) ) >> G_SHIFT ))
+ ((t) = (a) * (
comp2_t)(
b) + ONE_HALF, ((((t) >> G_SHIFT ) + (t) ) >> G_SHIFT ))
#define DIV_UNc(a, b) \
(((comp2_t) (a) * MASK) / (b))