~ubuntu-branches/ubuntu/karmic/lcms/karmic-updates

« back to all changes in this revision

Viewing changes to src/cmsgamma.c

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2009-04-03 13:55:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090403135500-psa3ox0my6u6a5cp
Tags: 1.18.dfsg-0ubuntu1
* New upstream release
* Remove 11_security_CVE-2009-0581_0723_0733.dpatch, security 
  issues fixed upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
       LPGAMMATABLE p;
115
115
       size_t size;
116
116
 
117
 
       if (nEntries > 65530 || nEntries < 0) {
 
117
       if (nEntries > 65530 || nEntries <= 0) {
118
118
                cmsSignalError(LCMS_ERRC_ABORTED, "Couldn't create gammatable of more than 65530 entries");
119
119
                return NULL;
120
120
       }
249
249
       LPGAMMATABLE p;
250
250
 
251
251
       // Try to reverse it analytically whatever possible
252
 
       if (InGamma -> Seed.Type > 0 && InGamma -> Seed.Type <= 5 &&                             
253
 
                        _cmsCrc32OfGammaTable(InGamma) == InGamma -> Seed.Crc32) {
 
252
       if (InGamma -> Seed.Type > 0 && InGamma -> Seed.Type <= 5 &&             
 
253
            _cmsCrc32OfGammaTable(InGamma) == InGamma -> Seed.Crc32) {
254
254
 
255
255
                return cmsBuildParametricGamma(nResultSamples, -(InGamma -> Seed.Type), InGamma ->Seed.Params);
256
256
       }