View | Details | Raw Unified | Return to bug 59081
Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +9 lines)
Line  Link Here
0
-- coders/bmp.c
0
++ coders/bmp.c
Lines 178-183 Link Here
178
    *q;
178
    *q;
179
179
180
  unsigned char
180
  unsigned char
181
    *end;
182
183
  unsigned char
181
    byte;
184
    byte;
182
185
183
  assert(image != (Image *) NULL);
186
  assert(image != (Image *) NULL);
Lines 189-201 Link Here
189
  byte=0;
192
  byte=0;
190
  x=0;
193
  x=0;
191
  q=pixels;
194
  q=pixels;
195
  end=pixels + (size_t) image->columns*image->rows;
192
  for (y=0; y < (long) image->rows; )
196
  for (y=0; y < (long) image->rows; )
193
  {
197
  {
198
    if (q < pixels || q  >= end)
199
      break;
194
    count=ReadBlobByte(image);
200
    count=ReadBlobByte(image);
195
    if (count == EOF)
201
    if (count == EOF)
196
      break;
202
      break;
197
    if (count != 0)
203
    if (count != 0)
198
      {
204
      {
205
        count=Min(count, end - q);
199
        /*
206
        /*
200
          Encoded mode.
207
          Encoded mode.
201
        */
208
        */
Lines 248-253 Link Here
248
            /*
255
            /*
249
              Absolute mode.
256
              Absolute mode.
250
            */
257
            */
258
    	    count=Min(count, end - q);
251
            if (compression == BI_RLE8)
259
            if (compression == BI_RLE8)
252
              for (i=(long) count; i != 0; --i)
260
              for (i=(long) count; i != 0; --i)
253
                *q++=(unsigned char) ReadBlobByte(image);
261
                *q++=(unsigned char) ReadBlobByte(image);

Return to bug 59081