diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-08-14 20:05:21 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-08-17 12:36:21 +0100 |
commit | 496d703c97c1fe7f99f28afca82696aeacbb5680 (patch) | |
tree | a81e4417f8dcc9f486d8b1c35c43785f67baf1bc /source | |
parent | dda017988150901dccd6b9dcb2823d7d8522433b (diff) | |
download | mupdf-496d703c97c1fe7f99f28afca82696aeacbb5680.tar.xz |
GProof: Fix a potential signed/unsigned problem in CMYK conversion.
Not sure if this is actually an issue at the moment, but it
potentially could be.
Diffstat (limited to 'source')
-rw-r--r-- | source/gprf/gprf-doc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c index d0551816..5f5631aa 100644 --- a/source/gprf/gprf-doc.c +++ b/source/gprf/gprf-doc.c @@ -226,17 +226,17 @@ static inline unsigned char *cmyk_to_rgba(unsigned char *out, uint32_t c, uint32 b = k - y; #endif r >>= 8; - if (r < 0) + if ((int)r < 0) r = 0; else if (r > 255) r = 255; g >>= 8; - if (g < 0) + if ((int)g < 0) g = 0; else if (g > 255) g = 255; b >>= 8; - if (b < 0) + if ((int)b < 0) b = 0; else if (b > 255) b = 255; |