Fix rollover when computing buffer size in tiff decoder (bug #2161)