Opened 18 years ago

#1734 new defect

TIFF rendering might crash on 64bit platforms + FIX

Reported by: tom.vijlbrief@… Owned by: mapserverbugs
Priority: high Milestone:
Component: WMS Server Version: 4.8
Severity: major Keywords:
Cc:

Description

TIFF rendering might crash on 64bit platforms.

in mapraster.c function drawTIFF()
the variables w, h and rowsPerstring are longs, but the TIFF
routines define them as uint32. This causes a crash on Tru64/Alpha
but probably also on other architectures. Fix:

  //long w, h; // tomv
  unsigned w, h;
  short type, nbits;
  unsigned short compression;
  unsigned short *red, *green, *blue;
  int cmap[MAXCOLORS];

  colorObj pixel;

  double startx, starty; /* this is where we start out reading */
  int st,strip;  /* current strip */
  int xi,yi,startj,endj,boffset,vv;

  double ulx, uly; /* upper left-hand coordinates */
  double skipx,skipy; /* skip factors (x and y) */
  double cx,cy; /* cell sizes (x and y) */
  //long rowsPerStrip;    // tomv
  unsigned rowsPerStrip;

Change History (0)

Note: See TracTickets for help on using tickets.