c
long product = sp->v_sampling * DCTSIZE;
if (product < 0 || product > (long)td->td_tilelength) {
  TIFFErrorExt(tif->tif_clientdata, module,
               "Potential integer overflow during tile height calculation");
  return (0);
}
if ((td->td_tilelength % product) != 0) {
  // ...
}
