tools/tiffcrop.c:6283: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `mirrorImage`.

tools/tiffcrop.c:6240:9: Call
6238. 
6239.     /* Checks for matching width or length as required */
6240.     if (extractCompositeRegions(image, crop, read_buff, crop_buff) != 0)
              ^
6241.       return (1);
6242. 

tools/tiffcrop.c:5221:3: Assignment
  5219.   composite_width = crop->combined_width;
  5220.   crop->combined_width = 0;
  5221.   crop->combined_length = 0;
          ^
  5222. 
  5223.   for (i = 0; i < crop->selections; i++)

tools/tiffcrop.c:6283:11: Call
6281.     if (crop->crop_mode & CROP_MIRROR)
6282.       {
6283.       if (mirrorImage(image->spp, image->bps, crop->mirror, 
                ^
6284.                       crop->combined_width, crop->combined_length, crop_buff))
6285.         {

tools/tiffcrop.c:7846:1: <LHS trace>
7844. 
7845. /* Mirror an image horizontally or vertically */
7846. static int
      ^
7847. mirrorImage(uint16 spp, uint16 bps, uint16 mirror, uint32 width, uint32 length, unsigned char *ibuff)
7848.   {

tools/tiffcrop.c:7846:1: Parameter `length`
  7844. 
  7845. /* Mirror an image horizontally or vertically */
  7846. static int
        ^
  7847. mirrorImage(uint16 spp, uint16 bps, uint16 mirror, uint32 width, uint32 length, unsigned char *ibuff)
  7848.   {

tools/tiffcrop.c:7869:14: Binary operation: ([0, +oo] - 1):unsigned32 by call to `mirrorImage` 
  7867.                }
  7868. 
  7869.              dst = ibuff + (rowsize * (length - 1));
                     ^
  7870.              for (row = 0; row < length / 2; row++)
  7871.                {

static int
mirrorImage(uint16 spp, uint16 bps, uint16 mirror, uint32 width, uint32 length, unsigned char *ibuff)
  {
  int      shift_width;
  uint32   bytes_per_pixel, bytes_per_sample;
  uint32   row, rowsize, row_offset;
  unsigned char *line_buff = NULL;
  unsigned char *src;
  unsigned char *dst;
  src = ibuff;
  rowsize = ((width * bps * spp) + 7) / 8;
  switch (mirror)
    {
    case MIRROR_BOTH:
    case MIRROR_VERT:
             line_buff = (unsigned char *)_TIFFmalloc(rowsize);
             if (line_buff == NULL)
               {
	       TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize);
               return (-1);
               }
             dst = ibuff + (rowsize * (length - 1));
             for (row = 0; row < length / 2; row++)
               {
	      _TIFFmemcpy(line_buff, src, rowsize);
	      _TIFFmemcpy(src, dst,  rowsize);
	      _TIFFmemcpy(dst, line_buff, rowsize);
               src += (rowsize);
               dst -= (rowsize);
               }
             if (line_buff)
               _TIFFfree(line_buff);
             if (mirror == MIRROR_VERT)
               break;
    case MIRROR_HORIZ :
              if ((bps % 8) == 0)
                {
                for (row = 0; row < length; row++)
                  {
		  row_offset = row * rowsize;
                  src = ibuff + row_offset;
                  dst = ibuff + row_offset + rowsize;
                  if (reverseSamplesBytes(spp, bps, width, src, dst))
                    {
		    return (-1);
                    }
		  }
		}
	      else
                {
                if (!(line_buff = (unsigned char *)_TIFFmalloc(rowsize + 1)))
                  {
                  TIFFError("mirrorImage", "Unable to allocate mirror line buffer");
                  return (-1);
                  }
                bytes_per_sample = (bps + 7) / 8;
                bytes_per_pixel  = ((bps * spp) + 7) / 8;
                if (bytes_per_pixel < (bytes_per_sample + 1))
                  shift_width = bytes_per_pixel;
                else
                  shift_width = bytes_per_sample + 1;
                for (row = 0; row < length; row++)
                  {
		  row_offset = row * rowsize;
                  src = ibuff + row_offset;
                  _TIFFmemset (line_buff, '\0', rowsize);
                  switch (shift_width)
                    {
                    case 1: if (reverseSamples8bits(spp, bps, width, src, line_buff))
                              {
		              _TIFFfree(line_buff);
                              return (-1);
                              }
                             _TIFFmemcpy (src, line_buff, rowsize);
                             break;
                    case 2: if (reverseSamples16bits(spp, bps, width, src, line_buff))
                              {
		              _TIFFfree(line_buff);
                              return (-1);
                              }
                             _TIFFmemcpy (src, line_buff, rowsize);
                             break;
                    case 3: if (reverseSamples24bits(spp, bps, width, src, line_buff))
                              {
		              _TIFFfree(line_buff);
                              return (-1);
                              }
                             _TIFFmemcpy (src, line_buff, rowsize);
                             break;
                    case 4:
                    case 5: if (reverseSamples32bits(spp, bps, width, src, line_buff))
                              {
		              _TIFFfree(line_buff);
                              return (-1);
                              }
                             _TIFFmemcpy (src, line_buff, rowsize);
                             break;
                    default: TIFFError("mirrorImage","Unsupported bit depth %d", bps);
		             _TIFFfree(line_buff);
                             return (-1);
                    }
		  }
                if (line_buff)
                  _TIFFfree(line_buff);
		}
             break;
    default: TIFFError ("mirrorImage", "Invalid mirror axis %d", mirror);
             return (-1);
             break;
    }
  return (0);
  }
['static int\nprocessCropSelections(struct image_data *image, struct crop_mask *crop,\n                      unsigned char **read_buff_ptr, struct buffinfo seg_buffs[])\n  {\n  int       i;\n  uint32    width, length, total_width, total_length;\n  tsize_t   cropsize;\n  unsigned  char *crop_buff = NULL;\n  unsigned  char *read_buff = NULL;\n  unsigned  char *next_buff = NULL;\n  tsize_t   prev_cropsize = 0;\n  read_buff = *read_buff_ptr;\n  if (crop->img_mode == COMPOSITE_IMAGES)\n    {\n    cropsize = crop->bufftotal;\n    crop_buff = seg_buffs[0].buffer;\n    if (!crop_buff)\n      crop_buff = (unsigned char *)_TIFFmalloc(cropsize);\n    else\n      {\n      prev_cropsize = seg_buffs[0].size;\n      if (prev_cropsize < cropsize)\n        {\n        next_buff = _TIFFrealloc(crop_buff, cropsize);\n        if (! next_buff)\n          {\n          _TIFFfree (crop_buff);\n          crop_buff = (unsigned char *)_TIFFmalloc(cropsize);\n          }\n        else\n          crop_buff = next_buff;\n        }\n      }\n    if (!crop_buff)\n      {\n      TIFFError("processCropSelections", "Unable to allocate/reallocate crop buffer");\n      return (-1);\n      }\n    _TIFFmemset(crop_buff, 0, cropsize);\n    seg_buffs[0].buffer = crop_buff;\n    seg_buffs[0].size = cropsize;\n    if (extractCompositeRegions(image, crop, read_buff, crop_buff) != 0)\n      return (1);\n    if (crop->crop_mode & CROP_INVERT)\n      {\n      switch (crop->photometric)\n        {\n        case PHOTOMETRIC_MINISWHITE:\n        case PHOTOMETRIC_MINISBLACK:\n\t     image->photometric = crop->photometric;\n\t     break;\n        case INVERT_DATA_ONLY:\n        case INVERT_DATA_AND_TAG:\n             if (invertImage(image->photometric, image->spp, image->bps,\n                             crop->combined_width, crop->combined_length, crop_buff))\n               {\n               TIFFError("processCropSelections",\n                         "Failed to invert colorspace for composite regions");\n               return (-1);\n               }\n             if (crop->photometric == INVERT_DATA_AND_TAG)\n               {\n               switch (image->photometric)\n                 {\n                 case PHOTOMETRIC_MINISWHITE:\n \t              image->photometric = PHOTOMETRIC_MINISBLACK;\n\t              break;\n                 case PHOTOMETRIC_MINISBLACK:\n \t              image->photometric = PHOTOMETRIC_MINISWHITE;\n\t              break;\n                 default:\n\t              break;\n\t         }\n\t       }\n             break;\n        default: break;\n        }\n      }\n    if (crop->crop_mode & CROP_MIRROR)\n      {\n      if (mirrorImage(image->spp, image->bps, crop->mirror,\n                      crop->combined_width, crop->combined_length, crop_buff))\n        {\n        TIFFError("processCropSelections", "Failed to mirror composite regions %s",\n\t         (crop->rotation == MIRROR_HORIZ) ? "horizontally" : "vertically");\n        return (-1);\n        }\n      }\n    if (crop->crop_mode & CROP_ROTATE)\n      {\n      if (rotateImage(crop->rotation, image, &crop->combined_width,\n                      &crop->combined_length, &crop_buff))\n        {\n        TIFFError("processCropSelections",\n                  "Failed to rotate composite regions by %d degrees", crop->rotation);\n        return (-1);\n        }\n      seg_buffs[0].buffer = crop_buff;\n      seg_buffs[0].size = (((crop->combined_width * image->bps + 7 ) / 8)\n                            * image->spp) * crop->combined_length;\n      }\n    }\n  else\n    {\n    total_width = total_length = 0;\n    for (i = 0; i < crop->selections; i++)\n      {\n      cropsize = crop->bufftotal;\n      crop_buff = seg_buffs[i].buffer;\n      if (!crop_buff)\n        crop_buff = (unsigned char *)_TIFFmalloc(cropsize);\n      else\n        {\n        prev_cropsize = seg_buffs[0].size;\n        if (prev_cropsize < cropsize)\n          {\n          next_buff = _TIFFrealloc(crop_buff, cropsize);\n          if (! next_buff)\n            {\n            _TIFFfree (crop_buff);\n            crop_buff = (unsigned char *)_TIFFmalloc(cropsize);\n            }\n          else\n            crop_buff = next_buff;\n          }\n        }\n      if (!crop_buff)\n        {\n        TIFFError("processCropSelections", "Unable to allocate/reallocate crop buffer");\n        return (-1);\n        }\n      _TIFFmemset(crop_buff, 0, cropsize);\n      seg_buffs[i].buffer = crop_buff;\n      seg_buffs[i].size = cropsize;\n      if (extractSeparateRegion(image, crop, read_buff, crop_buff, i))\n        {\n\tTIFFError("processCropSelections", "Unable to extract cropped region %d from image", i);\n        return (-1);\n        }\n      width  = crop->regionlist[i].width;\n      length = crop->regionlist[i].length;\n      if (crop->crop_mode & CROP_INVERT)\n        {\n        switch (crop->photometric)\n          {\n          case PHOTOMETRIC_MINISWHITE:\n          case PHOTOMETRIC_MINISBLACK:\n\t       image->photometric = crop->photometric;\n\t       break;\n          case INVERT_DATA_ONLY:\n          case INVERT_DATA_AND_TAG:\n               if (invertImage(image->photometric, image->spp, image->bps,\n                               width, length, crop_buff))\n                 {\n                 TIFFError("processCropSelections",\n                           "Failed to invert colorspace for region");\n                 return (-1);\n                 }\n               if (crop->photometric == INVERT_DATA_AND_TAG)\n                 {\n                 switch (image->photometric)\n                   {\n                   case PHOTOMETRIC_MINISWHITE:\n \t                image->photometric = PHOTOMETRIC_MINISBLACK;\n\t                break;\n                   case PHOTOMETRIC_MINISBLACK:\n \t                image->photometric = PHOTOMETRIC_MINISWHITE;\n\t                break;\n                   default:\n\t                break;\n\t           }\n\t         }\n               break;\n          default: break;\n          }\n        }\n      if (crop->crop_mode & CROP_MIRROR)\n        {\n        if (mirrorImage(image->spp, image->bps, crop->mirror,\n                        width, length, crop_buff))\n          {\n          TIFFError("processCropSelections", "Failed to mirror crop region %s",\n\t           (crop->rotation == MIRROR_HORIZ) ? "horizontally" : "vertically");\n          return (-1);\n          }\n        }\n      if (crop->crop_mode & CROP_ROTATE)\n        {\n\tif (rotateImage(crop->rotation, image, &crop->regionlist[i].width,\n\t\t\t&crop->regionlist[i].length, &crop_buff))\n          {\n          TIFFError("processCropSelections",\n                    "Failed to rotate crop region by %d degrees", crop->rotation);\n          return (-1);\n          }\n        total_width  += crop->regionlist[i].width;\n        total_length += crop->regionlist[i].length;\n        crop->combined_width = total_width;\n        crop->combined_length = total_length;\n        seg_buffs[i].buffer = crop_buff;\n        seg_buffs[i].size = (((crop->regionlist[i].width * image->bps + 7 ) / 8)\n                               * image->spp) * crop->regionlist[i].length;\n        }\n      }\n    }\n  return (0);\n  }', 'static int\nextractCompositeRegions(struct image_data *image,  struct crop_mask *crop,\n                        unsigned char *read_buff, unsigned char *crop_buff)\n  {\n  int       shift_width, bytes_per_sample, bytes_per_pixel;\n  uint32    i, trailing_bits, prev_trailing_bits;\n  uint32    row, first_row, last_row, first_col, last_col;\n  uint32    src_rowsize, dst_rowsize, src_offset, dst_offset;\n  uint32    crop_width, crop_length, img_width, img_length;\n  uint32    prev_length, prev_width, composite_width;\n  uint16    bps, spp;\n  uint8    *src, *dst;\n  tsample_t count, sample = 0;\n  img_width = image->width;\n  img_length = image->length;\n  bps = image->bps;\n  spp = image->spp;\n  count = spp;\n  bytes_per_sample = (bps + 7) / 8;\n  bytes_per_pixel  = ((bps * spp) + 7) / 8;\n  if ((bps % 8) == 0)\n    shift_width = 0;\n  else\n    {\n    if (bytes_per_pixel < (bytes_per_sample + 1))\n      shift_width = bytes_per_pixel;\n    else\n      shift_width = bytes_per_sample + 1;\n    }\n  src = read_buff;\n  dst = crop_buff;\n  prev_width = prev_length = 0;\n  prev_trailing_bits = trailing_bits = 0;\n  composite_width = crop->combined_width;\n  crop->combined_width = 0;\n  crop->combined_length = 0;\n  for (i = 0; i < crop->selections; i++)\n    {\n    first_row = crop->regionlist[i].y1;\n    last_row  = crop->regionlist[i].y2;\n    first_col = crop->regionlist[i].x1;\n    last_col  = crop->regionlist[i].x2;\n    crop_width = last_col - first_col + 1;\n    crop_length = last_row - first_row + 1;\n    crop->regionlist[i].width = crop_width;\n    crop->regionlist[i].length = crop_length;\n    crop->regionlist[i].buffptr = crop_buff;\n    src_rowsize = ((img_width * bps * spp) + 7) / 8;\n    dst_rowsize = (((crop_width * bps * count) + 7) / 8);\n    switch (crop->edge_ref)\n      {\n      default:\n      case EDGE_TOP:\n      case EDGE_BOTTOM:\n\t   if ((i > 0) && (crop_width != crop->regionlist[i - 1].width))\n             {\n\t     TIFFError ("extractCompositeRegions",\n                          "Only equal width regions can be combined for -E top or bottom");\n\t     return (1);\n             }\n           crop->combined_width = crop_width;\n           crop->combined_length += crop_length;\n           for (row = first_row; row <= last_row; row++)\n             {\n\t     src_offset = row * src_rowsize;\n\t     dst_offset = (row - first_row) * dst_rowsize;\n             src = read_buff + src_offset;\n             dst = crop_buff + dst_offset + (prev_length * dst_rowsize);\n             switch (shift_width)\n               {\n               case 0: if (extractContigSamplesBytes (src, dst, img_width, sample,\n                                                      spp, bps, count, first_col,\n                                                      last_col + 1))\n                         {\n\t\t         TIFFError("extractCompositeRegions",\n                                   "Unable to extract row %d", row);\n\t\t         return (1);\n\t\t         }\n\t\t       break;\n               case 1:  if (extractContigSamplesShifted8bits (src, dst, img_width,\n                                                              sample, spp, bps, count,\n                                                              first_col, last_col + 1,\n                                                              prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               case 2:  if (extractContigSamplesShifted16bits (src, dst, img_width,\n                                                               sample, spp, bps, count,\n                                                               first_col, last_col + 1,\n                                                               prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               case 3:  if (extractContigSamplesShifted24bits (src, dst, img_width,\n                                                               sample, spp, bps, count,\n                                                               first_col, last_col + 1,\n                                                               prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               case 4:\n               case 5:  if (extractContigSamplesShifted32bits (src, dst, img_width,\n                                                               sample, spp, bps, count,\n                                                               first_col, last_col + 1,\n                                                               prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               default: TIFFError("extractCompositeRegions", "Unsupported bit depth %d", bps);\n\t\t        return (1);\n\t       }\n             }\n           prev_length += crop_length;\n\t   break;\n      case EDGE_LEFT:\n      case EDGE_RIGHT:\n\t   if ((i > 0) && (crop_length != crop->regionlist[i - 1].length))\n             {\n\t     TIFFError ("extractCompositeRegions",\n                          "Only equal length regions can be combined for -E left or right");\n\t     return (1);\n             }\n           crop->combined_width += crop_width;\n           crop->combined_length = crop_length;\n           dst_rowsize = (((composite_width * bps * count) + 7) / 8);\n           trailing_bits = (crop_width * bps * count) % 8;\n           for (row = first_row; row <= last_row; row++)\n             {\n\t     src_offset = row * src_rowsize;\n\t     dst_offset = (row - first_row) * dst_rowsize;\n             src = read_buff + src_offset;\n             dst = crop_buff + dst_offset + prev_width;\n             switch (shift_width)\n               {\n               case 0: if (extractContigSamplesBytes (src, dst, img_width,\n                                                      sample, spp, bps, count,\n                                                      first_col, last_col + 1))\n                         {\n\t\t         TIFFError("extractCompositeRegions",\n                                   "Unable to extract row %d", row);\n\t\t         return (1);\n\t\t         }\n\t\t       break;\n               case 1:  if (extractContigSamplesShifted8bits (src, dst, img_width,\n                                                              sample, spp, bps, count,\n                                                              first_col, last_col + 1,\n                                                              prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               case 2:  if (extractContigSamplesShifted16bits (src, dst, img_width,\n                                                               sample, spp, bps, count,\n                                                               first_col, last_col + 1,\n                                                               prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               case 3:  if (extractContigSamplesShifted24bits (src, dst, img_width,\n                                                               sample, spp, bps, count,\n                                                               first_col, last_col + 1,\n                                                               prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               case 4:\n               case 5:  if (extractContigSamplesShifted32bits (src, dst, img_width,\n                                                               sample, spp, bps, count,\n                                                               first_col, last_col + 1,\n                                                               prev_trailing_bits))\n                          {\n\t\t          TIFFError("extractCompositeRegions",\n                                    "Unable to extract row %d", row);\n\t\t          return (1);\n\t\t          }\n\t\t        break;\n               default: TIFFError("extractCompositeRegions", "Unsupported bit depth %d", bps);\n\t\t        return (1);\n\t       }\n\t     }\n\t   prev_width += (crop_width * bps * count) / 8;\n           prev_trailing_bits += trailing_bits;\n           if (prev_trailing_bits > 7)\n\t     prev_trailing_bits-= 8;\n\t   break;\n      }\n    }\n  if (crop->combined_width != composite_width)\n    TIFFError("combineSeparateRegions","Combined width does not match composite width");\n  return (0);\n  }', 'static int\nmirrorImage(uint16 spp, uint16 bps, uint16 mirror, uint32 width, uint32 length, unsigned char *ibuff)\n  {\n  int      shift_width;\n  uint32   bytes_per_pixel, bytes_per_sample;\n  uint32   row, rowsize, row_offset;\n  unsigned char *line_buff = NULL;\n  unsigned char *src;\n  unsigned char *dst;\n  src = ibuff;\n  rowsize = ((width * bps * spp) + 7) / 8;\n  switch (mirror)\n    {\n    case MIRROR_BOTH:\n    case MIRROR_VERT:\n             line_buff = (unsigned char *)_TIFFmalloc(rowsize);\n             if (line_buff == NULL)\n               {\n\t       TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize);\n               return (-1);\n               }\n             dst = ibuff + (rowsize * (length - 1));\n             for (row = 0; row < length / 2; row++)\n               {\n\t      _TIFFmemcpy(line_buff, src, rowsize);\n\t      _TIFFmemcpy(src, dst,  rowsize);\n\t      _TIFFmemcpy(dst, line_buff, rowsize);\n               src += (rowsize);\n               dst -= (rowsize);\n               }\n             if (line_buff)\n               _TIFFfree(line_buff);\n             if (mirror == MIRROR_VERT)\n               break;\n    case MIRROR_HORIZ :\n              if ((bps % 8) == 0)\n                {\n                for (row = 0; row < length; row++)\n                  {\n\t\t  row_offset = row * rowsize;\n                  src = ibuff + row_offset;\n                  dst = ibuff + row_offset + rowsize;\n                  if (reverseSamplesBytes(spp, bps, width, src, dst))\n                    {\n\t\t    return (-1);\n                    }\n\t\t  }\n\t\t}\n\t      else\n                {\n                if (!(line_buff = (unsigned char *)_TIFFmalloc(rowsize + 1)))\n                  {\n                  TIFFError("mirrorImage", "Unable to allocate mirror line buffer");\n                  return (-1);\n                  }\n                bytes_per_sample = (bps + 7) / 8;\n                bytes_per_pixel  = ((bps * spp) + 7) / 8;\n                if (bytes_per_pixel < (bytes_per_sample + 1))\n                  shift_width = bytes_per_pixel;\n                else\n                  shift_width = bytes_per_sample + 1;\n                for (row = 0; row < length; row++)\n                  {\n\t\t  row_offset = row * rowsize;\n                  src = ibuff + row_offset;\n                  _TIFFmemset (line_buff, \'\\0\', rowsize);\n                  switch (shift_width)\n                    {\n                    case 1: if (reverseSamples8bits(spp, bps, width, src, line_buff))\n                              {\n\t\t              _TIFFfree(line_buff);\n                              return (-1);\n                              }\n                             _TIFFmemcpy (src, line_buff, rowsize);\n                             break;\n                    case 2: if (reverseSamples16bits(spp, bps, width, src, line_buff))\n                              {\n\t\t              _TIFFfree(line_buff);\n                              return (-1);\n                              }\n                             _TIFFmemcpy (src, line_buff, rowsize);\n                             break;\n                    case 3: if (reverseSamples24bits(spp, bps, width, src, line_buff))\n                              {\n\t\t              _TIFFfree(line_buff);\n                              return (-1);\n                              }\n                             _TIFFmemcpy (src, line_buff, rowsize);\n                             break;\n                    case 4:\n                    case 5: if (reverseSamples32bits(spp, bps, width, src, line_buff))\n                              {\n\t\t              _TIFFfree(line_buff);\n                              return (-1);\n                              }\n                             _TIFFmemcpy (src, line_buff, rowsize);\n                             break;\n                    default: TIFFError("mirrorImage","Unsupported bit depth %d", bps);\n\t\t             _TIFFfree(line_buff);\n                             return (-1);\n                    }\n\t\t  }\n                if (line_buff)\n                  _TIFFfree(line_buff);\n\t\t}\n             break;\n    default: TIFFError ("mirrorImage", "Invalid mirror axis %d", mirror);\n             return (-1);\n             break;\n    }\n  return (0);\n  }']