diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-02-06 19:30:32 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-02-06 19:30:32 +0000 |
commit | 28392816c15b357c923281e4d0ddbca4d97f578b (patch) | |
tree | 7c67c56b0fd61b8942f43af85db1309bc16a8065 /jquant2.c | |
parent | cabd22366aca7d00189ebf6ea0f88b48a066638b (diff) |
Fix several potential overflow issues identified by the community.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1112 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jquant2.c')
-rw-r--r-- | jquant2.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -513,6 +513,8 @@ compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) } } + if (total == 0) + return; cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); |