]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
tiffcheck: Don't allow "fudge factor" when checking length
authorAidan Van Dyk <aidan@ifax.com>
Mon, 28 May 2007 18:34:48 +0000 (18:34 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 28 May 2007 18:34:48 +0000 (18:34 +0000)
No fudge factor is allowed in FaxServer::sendSetupParams1(), which
means that a tiff that passes tiffcheck will cause an error when faxsend
comes across it.

util/tiffcheck.c++

index fa301118553ef633de130445ddbaaa813f85881a..702b0947cfc8ad99c087c687b9389278c33960c2 100644 (file)
@@ -272,7 +272,7 @@ checkPageFormat(TIFF* tif, fxStr& emsg)
      */
     if (!useUnlimitedLength) {
        float len = h / (yres == 0 ? 1. : yres);                // page length in mm
-       if (pageLength != (uint32) -1 && len > pageLength+30) {
+       if (pageLength != (uint32) -1 && len > pageLength) {
            emsg.append(fxStr::format("Document requires resizing to adjust"
                " page length (convert to %lu, document is %lu).\n",
                (u_long) pageLength, (u_long) len));