Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 277202 | Differences between
and this patch

Collapse All | Expand All

(-)openexr-1.6.1/IlmImf/ImfB44Compressor.cpp (-5 / +10 lines)
Lines 101-106 Link Here
101
#include <ImfHeader.h>
101
#include <ImfHeader.h>
102
#include <ImfChannelList.h>
102
#include <ImfChannelList.h>
103
#include <ImfMisc.h>
103
#include <ImfMisc.h>
104
#include <ImfCheckedArithmetic.h>
104
#include <ImathFun.h>
105
#include <ImathFun.h>
105
#include <ImathBox.h>
106
#include <ImathBox.h>
106
#include <Iex.h>
107
#include <Iex.h>
Lines 465-472 struct B44Compressor::ChannelData Link Here
465
466
466
B44Compressor::B44Compressor
467
B44Compressor::B44Compressor
467
    (const Header &hdr,
468
    (const Header &hdr,
468
     int maxScanLineSize,
469
     size_t maxScanLineSize,
469
     int numScanLines,
470
     size_t numScanLines,
470
     bool optFlatFields)
471
     bool optFlatFields)
471
:
472
:
472
    Compressor (hdr),
473
    Compressor (hdr),
Lines 487-493 B44Compressor::B44Compressor Link Here
487
    // if uncompressed pixel data should be in native or Xdr format.
488
    // if uncompressed pixel data should be in native or Xdr format.
488
    //
489
    //
489
490
490
    _tmpBuffer = new unsigned short [maxScanLineSize * numScanLines];
491
    _tmpBuffer = new unsigned short
492
        [checkArraySize (uiMult (maxScanLineSize, numScanLines),
493
                         sizeof (unsigned short))];
491
494
492
    const ChannelList &channels = header().channels();
495
    const ChannelList &channels = header().channels();
493
    int numHalfChans = 0;
496
    int numHalfChans = 0;
Lines 507-515 B44Compressor::B44Compressor Link Here
507
    // Compressed data may be larger than the input data
510
    // Compressed data may be larger than the input data
508
    //
511
    //
509
512
510
    int padding = 12 * numHalfChans * (numScanLines + 3) / 4;
513
    size_t padding = 12 * numHalfChans * (numScanLines + 3) / 4;
514
515
    _outBuffer = new char
516
        [uiAdd (uiMult (maxScanLineSize, numScanLines), padding)];
511
517
512
    _outBuffer = new char [maxScanLineSize * numScanLines + padding];
513
    _channelData = new ChannelData[_numChans];
518
    _channelData = new ChannelData[_numChans];
514
519
515
    int i = 0;
520
    int i = 0;
(-)openexr-1.6.1/IlmImf/ImfB44Compressor.h (-2 / +2 lines)
Lines 54-61 class B44Compressor: public Compressor Link Here
54
  public:
54
  public:
55
55
56
    B44Compressor (const Header &hdr,
56
    B44Compressor (const Header &hdr,
57
                   int maxScanLineSize,
57
                   size_t maxScanLineSize,
58
		   int numScanLines,
58
		   size_t numScanLines,
59
		   bool optFlatFields);
59
		   bool optFlatFields);
60
60
61
    virtual ~B44Compressor ();
61
    virtual ~B44Compressor ();
(-)openexr-1.6.1/IlmImf/ImfCheckedArithmetic.h (+161 lines)
Line 0 Link Here
1
///////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (c) 2009, Industrial Light & Magic, a division of Lucas
4
// Digital Ltd. LLC
5
// 
6
// All rights reserved.
7
// 
8
// Redistribution and use in source and binary forms, with or without
9
// modification, are permitted provided that the following conditions are
10
// met:
11
// *       Redistributions of source code must retain the above copyright
12
// notice, this list of conditions and the following disclaimer.
13
// *       Redistributions in binary form must reproduce the above
14
// copyright notice, this list of conditions and the following disclaimer
15
// in the documentation and/or other materials provided with the
16
// distribution.
17
// *       Neither the name of Industrial Light & Magic nor the names of
18
// its contributors may be used to endorse or promote products derived
19
// from this software without specific prior written permission. 
20
// 
21
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
//
33
///////////////////////////////////////////////////////////////////////////
34
35
#ifndef INCLUDED_IMF_CHECKED_ARITHMETIC_H
36
#define INCLUDED_IMF_CHECKED_ARITHMETIC_H
37
38
//-----------------------------------------------------------------------------
39
//
40
//	Integer arithmetic operations that throw exceptions
41
//      on overflow, underflow or division by zero.
42
//
43
//-----------------------------------------------------------------------------
44
45
#include <limits>
46
#include <IexMathExc.h>
47
48
namespace Imf {
49
50
template <bool b> struct StaticAssertionFailed;
51
template <> struct StaticAssertionFailed <true> {};
52
53
#define IMF_STATIC_ASSERT(x) \
54
    do {StaticAssertionFailed <x> staticAssertionFailed;} while (false)
55
56
57
template <class T>
58
T
59
uiMult (T a, T b)
60
{
61
    //
62
    // Unsigned integer multiplication
63
    //
64
65
    IMF_STATIC_ASSERT (!std::numeric_limits<T>::is_signed &&
66
                        std::numeric_limits<T>::is_integer);
67
68
    if (a > 0 && b > std::numeric_limits<T>::max() / a)
69
        throw Iex::OverflowExc ("Integer multiplication overflow.");
70
71
    return a * b;
72
}
73
74
75
template <class T>
76
T
77
uiDiv (T a, T b)
78
{
79
    //
80
    // Unsigned integer division
81
    //
82
83
    IMF_STATIC_ASSERT (!std::numeric_limits<T>::is_signed &&
84
                        std::numeric_limits<T>::is_integer);
85
86
    if (b == 0)
87
        throw Iex::DivzeroExc ("Integer division by zero.");
88
89
    return a / b;
90
}
91
92
93
template <class T>
94
T
95
uiAdd (T a, T b)
96
{
97
    //
98
    // Unsigned integer addition
99
    //
100
101
    IMF_STATIC_ASSERT (!std::numeric_limits<T>::is_signed &&
102
                        std::numeric_limits<T>::is_integer);
103
104
    if (a > std::numeric_limits<T>::max() - b)
105
        throw Iex::OverflowExc ("Integer addition overflow.");
106
107
    return a + b;
108
}
109
110
111
template <class T>
112
T
113
uiSub (T a, T b)
114
{
115
    //
116
    // Unsigned integer subtraction
117
    //
118
119
    IMF_STATIC_ASSERT (!std::numeric_limits<T>::is_signed &&
120
                        std::numeric_limits<T>::is_integer);
121
122
    if (a < b)
123
        throw Iex::UnderflowExc ("Integer subtraction underflow.");
124
125
    return a - b;
126
}
127
128
129
template <class T>
130
size_t
131
checkArraySize (T n, size_t s)
132
{
133
    //
134
    // Verify that the size, in bytes, of an array with n elements
135
    // of size s can be computed without overflowing:
136
    //
137
    // If computing
138
    //
139
    //      size_t (n) * s
140
    //
141
    // would overflow, then throw an Iex::OverflowExc exception.
142
    // Otherwise return
143
    //
144
    //      size_t (n).
145
    //
146
147
    IMF_STATIC_ASSERT (!std::numeric_limits<T>::is_signed &&
148
                        std::numeric_limits<T>::is_integer);
149
150
    IMF_STATIC_ASSERT (sizeof (T) <= sizeof (size_t));
151
152
    if (size_t (n) > std::numeric_limits<size_t>::max() / s)
153
        throw Iex::OverflowExc ("Integer multiplication overflow.");
154
155
    return size_t (n);
156
}
157
158
159
} // namespace Imf
160
161
#endif
(-)openexr-1.6.1/IlmImf/ImfCompressor.cpp (-4 / +5 lines)
Lines 46-51 Link Here
46
#include <ImfPizCompressor.h>
46
#include <ImfPizCompressor.h>
47
#include <ImfPxr24Compressor.h>
47
#include <ImfPxr24Compressor.h>
48
#include <ImfB44Compressor.h>
48
#include <ImfB44Compressor.h>
49
#include <ImfCheckedArithmetic.h>
49
50
50
namespace Imf {
51
namespace Imf {
51
52
Lines 109-115 isValidCompression (Compression c) Link Here
109
110
110
111
111
Compressor *
112
Compressor *
112
newCompressor (Compression c, int maxScanLineSize, const Header &hdr)
113
newCompressor (Compression c, size_t maxScanLineSize, const Header &hdr)
113
{
114
{
114
    switch (c)
115
    switch (c)
115
    {
116
    {
Lines 150-164 newCompressor (Compression c, int maxSca Link Here
150
151
151
Compressor *
152
Compressor *
152
newTileCompressor (Compression c,
153
newTileCompressor (Compression c,
153
		   int tileLineSize,
154
		   size_t tileLineSize,
154
		   int numTileLines,
155
		   size_t numTileLines,
155
		   const Header &hdr)
156
		   const Header &hdr)
156
{
157
{
157
    switch (c)
158
    switch (c)
158
    {
159
    {
159
      case RLE_COMPRESSION:
160
      case RLE_COMPRESSION:
160
161
161
	return new RleCompressor (hdr, tileLineSize * numTileLines);
162
	return new RleCompressor (hdr, uiMult (tileLineSize, numTileLines));
162
163
163
      case ZIPS_COMPRESSION:
164
      case ZIPS_COMPRESSION:
164
      case ZIP_COMPRESSION:
165
      case ZIP_COMPRESSION:
(-)openexr-1.6.1/IlmImf/ImfCompressor.h (-3 / +4 lines)
Lines 45-50 Link Here
45
45
46
#include <ImfCompression.h>
46
#include <ImfCompression.h>
47
#include "ImathBox.h"
47
#include "ImathBox.h"
48
#include <stdlib.h>
48
49
49
namespace Imf {
50
namespace Imf {
50
51
Lines 219-225 bool isValidCompression (Compression c) Link Here
219
//-----------------------------------------------------------------
220
//-----------------------------------------------------------------
220
221
221
Compressor *	newCompressor (Compression c,
222
Compressor *	newCompressor (Compression c,
222
			       int maxScanLineSize,
223
			       size_t maxScanLineSize,
223
			       const Header &hdr);
224
			       const Header &hdr);
224
225
225
226
Lines 241-248 Compressor * newCompressor (Compression Link Here
241
//-----------------------------------------------------------------
242
//-----------------------------------------------------------------
242
243
243
Compressor *    newTileCompressor (Compression c,
244
Compressor *    newTileCompressor (Compression c,
244
				   int tileLineSize,
245
				   size_t tileLineSize,
245
				   int numTileLines,
246
				   size_t numTileLines,
246
				   const Header &hdr);
247
				   const Header &hdr);
247
248
248
249
(-)openexr-1.6.1/IlmImf/ImfHuf.cpp (-3 / +17 lines)
Lines 579-584 hufUnpackEncTable Link Here
579
//
579
//
580
580
581
//
581
//
582
// Clear a newly allocated decoding table so that it contains only zeroes.
583
//
584
585
void
586
hufClearDecTable
587
    (HufDec *		hdecod)		// io: (allocated by caller)
588
     					//     decoding table [HUF_DECSIZE]
589
{
590
    memset (hdecod, 0, sizeof (HufDec) * HUF_DECSIZE);
591
}
592
593
594
//
582
// Build a decoding hash table based on the encoding table hcode:
595
// Build a decoding hash table based on the encoding table hcode:
583
//	- short codes (<= HUF_DECBITS) are resolved with a single table access;
596
//	- short codes (<= HUF_DECBITS) are resolved with a single table access;
584
//	- long code entry allocations are not optimized, because long codes are
597
//	- long code entry allocations are not optimized, because long codes are
Lines 595-605 hufBuildDecTable Link Here
595
     					//     decoding table [HUF_DECSIZE]
608
     					//     decoding table [HUF_DECSIZE]
596
{
609
{
597
    //
610
    //
598
    // Init hashtable & loop on all codes
611
    // Init hashtable & loop on all codes.
612
    // Assumes that hufClearDecTable(hdecod) has already been called.
599
    //
613
    //
600
614
601
    memset (hdecod, 0, sizeof (HufDec) * HUF_DECSIZE);
602
603
    for (; im <= iM; im++)
615
    for (; im <= iM; im++)
604
    {
616
    {
605
	Int64 c = hufCode (hcode[im]);
617
	Int64 c = hufCode (hcode[im]);
Lines 1049-1054 hufUncompress (const char compressed[], Link Here
1049
    AutoArray <Int64, HUF_ENCSIZE> freq;
1061
    AutoArray <Int64, HUF_ENCSIZE> freq;
1050
    AutoArray <HufDec, HUF_DECSIZE> hdec;
1062
    AutoArray <HufDec, HUF_DECSIZE> hdec;
1051
1063
1064
    hufClearDecTable (hdec);
1065
1052
    hufUnpackEncTable (&ptr, nCompressed - (ptr - compressed), im, iM, freq);
1066
    hufUnpackEncTable (&ptr, nCompressed - (ptr - compressed), im, iM, freq);
1053
1067
1054
    try
1068
    try
(-)openexr-1.6.1/IlmImf/ImfPizCompressor.cpp (-4 / +14 lines)
Lines 45-50 Link Here
45
#include <ImfHuf.h>
45
#include <ImfHuf.h>
46
#include <ImfWav.h>
46
#include <ImfWav.h>
47
#include <ImfMisc.h>
47
#include <ImfMisc.h>
48
#include <ImfCheckedArithmetic.h>
48
#include <ImathFun.h>
49
#include <ImathFun.h>
49
#include <ImathBox.h>
50
#include <ImathBox.h>
50
#include <Iex.h>
51
#include <Iex.h>
Lines 168-175 struct PizCompressor::ChannelData Link Here
168
169
169
PizCompressor::PizCompressor
170
PizCompressor::PizCompressor
170
    (const Header &hdr,
171
    (const Header &hdr,
171
     int maxScanLineSize,
172
     size_t maxScanLineSize,
172
     int numScanLines)
173
     size_t numScanLines)
173
:
174
:
174
    Compressor (hdr),
175
    Compressor (hdr),
175
    _maxScanLineSize (maxScanLineSize),
176
    _maxScanLineSize (maxScanLineSize),
Lines 181-188 PizCompressor::PizCompressor Link Here
181
    _channels (hdr.channels()),
182
    _channels (hdr.channels()),
182
    _channelData (0)
183
    _channelData (0)
183
{
184
{
184
    _tmpBuffer = new unsigned short [maxScanLineSize * numScanLines / 2];
185
    size_t tmpBufferSize =
185
    _outBuffer = new char [maxScanLineSize * numScanLines + 65536 + 8192];
186
                uiMult (maxScanLineSize, numScanLines) / 2;
187
188
    size_t outBufferSize =
189
                uiAdd (uiMult (maxScanLineSize, numScanLines),
190
                       size_t (65536 + 8192));
191
192
    _tmpBuffer = new unsigned short
193
            [checkArraySize (tmpBufferSize, sizeof (unsigned short))];
194
195
    _outBuffer = new char [outBufferSize];
186
196
187
    const ChannelList &channels = header().channels();
197
    const ChannelList &channels = header().channels();
188
    bool onlyHalfChannels = true;
198
    bool onlyHalfChannels = true;
(-)openexr-1.6.1/IlmImf/ImfPizCompressor.h (-1 / +4 lines)
Lines 53-59 class PizCompressor: public Compressor Link Here
53
{
53
{
54
  public:
54
  public:
55
55
56
    PizCompressor (const Header &hdr, int maxScanLineSize, int numScanLines);
56
    PizCompressor (const Header &hdr,
57
                   size_t maxScanLineSize,
58
                   size_t numScanLines);
59
57
    virtual ~PizCompressor ();
60
    virtual ~PizCompressor ();
58
61
59
    virtual int		numScanLines () const;
62
    virtual int		numScanLines () const;
(-)openexr-1.6.1/IlmImf/ImfPreviewImage.cpp (-1 / +3 lines)
Lines 40-45 Link Here
40
//-----------------------------------------------------------------------------
40
//-----------------------------------------------------------------------------
41
41
42
#include <ImfPreviewImage.h>
42
#include <ImfPreviewImage.h>
43
#include <ImfCheckedArithmetic.h>
43
#include "Iex.h"
44
#include "Iex.h"
44
45
45
namespace Imf {
46
namespace Imf {
Lines 51-57 PreviewImage::PreviewImage (unsigned int Link Here
51
{
52
{
52
    _width = width;
53
    _width = width;
53
    _height = height;
54
    _height = height;
54
    _pixels = new PreviewRgba [_width * _height];
55
    _pixels = new PreviewRgba
56
        [checkArraySize (uiMult (_width, _height), sizeof (PreviewRgba))];
55
57
56
    if (pixels)
58
    if (pixels)
57
    {
59
    {
(-)openexr-1.6.1/IlmImf/ImfPxr24Compressor.cpp (-4 / +11 lines)
Lines 67-72 Link Here
67
#include <ImfHeader.h>
67
#include <ImfHeader.h>
68
#include <ImfChannelList.h>
68
#include <ImfChannelList.h>
69
#include <ImfMisc.h>
69
#include <ImfMisc.h>
70
#include <ImfCheckedArithmetic.h>
70
#include <ImathFun.h>
71
#include <ImathFun.h>
71
#include <Iex.h>
72
#include <Iex.h>
72
#include <half.h>
73
#include <half.h>
Lines 175-182 tooMuchData () Link Here
175
176
176
177
177
Pxr24Compressor::Pxr24Compressor (const Header &hdr,
178
Pxr24Compressor::Pxr24Compressor (const Header &hdr,
178
				  int maxScanLineSize,
179
				  size_t maxScanLineSize,
179
				  int numScanLines)
180
				  size_t numScanLines)
180
:
181
:
181
    Compressor (hdr),
182
    Compressor (hdr),
182
    _maxScanLineSize (maxScanLineSize),
183
    _maxScanLineSize (maxScanLineSize),
Lines 185-194 Pxr24Compressor::Pxr24Compressor (const Link Here
185
    _outBuffer (0),
186
    _outBuffer (0),
186
    _channels (hdr.channels())
187
    _channels (hdr.channels())
187
{
188
{
188
    int maxInBytes = maxScanLineSize * numScanLines;
189
    size_t maxInBytes =
190
        uiMult (maxScanLineSize, numScanLines);
191
192
    size_t maxOutBytes =
193
        uiAdd (uiAdd (maxInBytes,
194
                      size_t (ceil (maxInBytes * 0.01))),
195
               size_t (100));
189
196
190
    _tmpBuffer = new unsigned char [maxInBytes];
197
    _tmpBuffer = new unsigned char [maxInBytes];
191
    _outBuffer = new char [int (ceil (maxInBytes * 1.01)) + 100];
198
    _outBuffer = new char [maxOutBytes];
192
199
193
    const Box2i &dataWindow = hdr.dataWindow();
200
    const Box2i &dataWindow = hdr.dataWindow();
194
201
(-)openexr-1.6.1/IlmImf/ImfPxr24Compressor.h (-1 / +4 lines)
Lines 51-57 class Pxr24Compressor: public Compressor Link Here
51
{
51
{
52
  public:
52
  public:
53
53
54
    Pxr24Compressor (const Header &hdr, int maxScanLineSize, int numScanLines);
54
    Pxr24Compressor (const Header &hdr, 
55
                     size_t maxScanLineSize,
56
                     size_t numScanLines);
57
55
    virtual ~Pxr24Compressor ();
58
    virtual ~Pxr24Compressor ();
56
59
57
    virtual int		numScanLines () const;
60
    virtual int		numScanLines () const;
(-)openexr-1.6.1/IlmImf/ImfRleCompressor.cpp (-2 / +3 lines)
Lines 41-46 Link Here
41
//-----------------------------------------------------------------------------
41
//-----------------------------------------------------------------------------
42
42
43
#include <ImfRleCompressor.h>
43
#include <ImfRleCompressor.h>
44
#include <ImfCheckedArithmetic.h>
44
#include "Iex.h"
45
#include "Iex.h"
45
46
46
namespace Imf {
47
namespace Imf {
Lines 158-171 rleUncompress (int inLength, int maxLeng Link Here
158
} // namespace
159
} // namespace
159
160
160
161
161
RleCompressor::RleCompressor (const Header &hdr, int maxScanLineSize):
162
RleCompressor::RleCompressor (const Header &hdr, size_t maxScanLineSize):
162
    Compressor (hdr),
163
    Compressor (hdr),
163
    _maxScanLineSize (maxScanLineSize),
164
    _maxScanLineSize (maxScanLineSize),
164
    _tmpBuffer (0),
165
    _tmpBuffer (0),
165
    _outBuffer (0)
166
    _outBuffer (0)
166
{
167
{
167
    _tmpBuffer = new char [maxScanLineSize];
168
    _tmpBuffer = new char [maxScanLineSize];
168
    _outBuffer = new char [maxScanLineSize * 3 / 2];
169
    _outBuffer = new char [uiMult (maxScanLineSize, size_t (3)) / 2];
169
}
170
}
170
171
171
172
(-)openexr-1.6.1/IlmImf/ImfRleCompressor.h (-1 / +1 lines)
Lines 52-58 class RleCompressor: public Compressor Link Here
52
{
52
{
53
  public:
53
  public:
54
54
55
    RleCompressor (const Header &hdr, int maxScanLineSize);
55
    RleCompressor (const Header &hdr, size_t maxScanLineSize);
56
    virtual ~RleCompressor ();
56
    virtual ~RleCompressor ();
57
57
58
    virtual int numScanLines () const;
58
    virtual int numScanLines () const;
(-)openexr-1.6.1/IlmImf/ImfZipCompressor.cpp (-4 / +13 lines)
Lines 41-46 Link Here
41
//-----------------------------------------------------------------------------
41
//-----------------------------------------------------------------------------
42
42
43
#include <ImfZipCompressor.h>
43
#include <ImfZipCompressor.h>
44
#include <ImfCheckedArithmetic.h>
44
#include "Iex.h"
45
#include "Iex.h"
45
#include <zlib.h>
46
#include <zlib.h>
46
47
Lines 49-56 namespace Imf { Link Here
49
50
50
ZipCompressor::ZipCompressor
51
ZipCompressor::ZipCompressor
51
    (const Header &hdr,
52
    (const Header &hdr,
52
     int maxScanLineSize,
53
     size_t maxScanLineSize,
53
     int numScanLines)
54
     size_t numScanLines)
54
:
55
:
55
    Compressor (hdr),
56
    Compressor (hdr),
56
    _maxScanLineSize (maxScanLineSize),
57
    _maxScanLineSize (maxScanLineSize),
Lines 58-68 ZipCompressor::ZipCompressor Link Here
58
    _tmpBuffer (0),
59
    _tmpBuffer (0),
59
    _outBuffer (0)
60
    _outBuffer (0)
60
{
61
{
62
    size_t maxInBytes =
63
        uiMult (maxScanLineSize, numScanLines);
64
65
    size_t maxOutBytes =
66
        uiAdd (uiAdd (maxInBytes,
67
                      size_t (ceil (maxInBytes * 0.01))),
68
               size_t (100));
69
61
    _tmpBuffer =
70
    _tmpBuffer =
62
	new char [maxScanLineSize * numScanLines];
71
	new char [maxInBytes];
63
72
64
    _outBuffer =
73
    _outBuffer =
65
	new char [int (ceil (maxScanLineSize * numScanLines * 1.01)) + 100];
74
	new char [maxOutBytes];
66
}
75
}
67
76
68
77
(-)openexr-1.6.1/IlmImf/ImfZipCompressor.h (-1 / +4 lines)
Lines 52-58 class ZipCompressor: public Compressor Link Here
52
{
52
{
53
  public:
53
  public:
54
54
55
    ZipCompressor (const Header &hdr, int maxScanLineSize, int numScanLines);
55
    ZipCompressor (const Header &hdr, 
56
                   size_t maxScanLineSize,
57
                   size_t numScanLines);
58
56
    virtual ~ZipCompressor ();
59
    virtual ~ZipCompressor ();
57
60
58
    virtual int numScanLines () const;
61
    virtual int numScanLines () const;
(-)openexr-1.6.1/IlmImf/Makefile.am (-2 / +5 lines)
Lines 56-62 libIlmImf_la_SOURCES = ImfAttribute.cpp Link Here
56
		       ImfTiledOutputFile.h ImfTiledRgbaFile.h \
56
		       ImfTiledOutputFile.h ImfTiledRgbaFile.h \
57
		       ImfRgbaYca.cpp ImfRgbaYca.h \
57
		       ImfRgbaYca.cpp ImfRgbaYca.h \
58
		       ImfPxr24Compressor.cpp ImfPxr24Compressor.h \
58
		       ImfPxr24Compressor.cpp ImfPxr24Compressor.h \
59
		       ImfTestFile.cpp ImfTestFile.h ImfThreading.h
59
		       ImfTestFile.cpp ImfTestFile.h ImfThreading.h \
60
		       ImfCheckedArithmetic.h
61
60
62
61
libIlmImf_la_LDFLAGS = @ILMBASE_LDFLAGS@ -version-info @LIBTOOL_VERSION@ \
63
libIlmImf_la_LDFLAGS = @ILMBASE_LDFLAGS@ -version-info @LIBTOOL_VERSION@ \
62
			-no-undefined
64
			-no-undefined
Lines 99-105 libIlmImfinclude_HEADERS = ImfAttribute. Link Here
99
101
100
noinst_HEADERS = ImfCompressor.h ImfRleCompressor.h ImfZipCompressor.h \
102
noinst_HEADERS = ImfCompressor.h ImfRleCompressor.h ImfZipCompressor.h \
101
		 ImfPizCompressor.h ImfMisc.h ImfAutoArray.h ImfTiledMisc.h \
103
		 ImfPizCompressor.h ImfMisc.h ImfAutoArray.h ImfTiledMisc.h \
102
		 ImfTileOffsets.h ImfScanLineInputFile.h ImfPxr24Compressor.h
104
		 ImfTileOffsets.h ImfScanLineInputFile.h ImfPxr24Compressor.h \
105
		 ImfCheckedArithmetic.h
103
106
104
EXTRA_DIST = $(noinst_HEADERS) b44ExpLogTable.cpp b44ExpLogTable.h
107
EXTRA_DIST = $(noinst_HEADERS) b44ExpLogTable.cpp b44ExpLogTable.h
105
108

Return to bug 277202