guard against division by 0

valgrind + bff

(cherry picked from commit 1ab0e8717bee9fee6c42015647bccfbf1683b8fc)

Conflicts:
	filter/source/graphicfilter/itiff/itiff.cxx

Change-Id: I5fa40f7a9759c98bb70ee6eb854dd9b376401f89
Reviewed-on: https://gerrit.libreoffice.org/11037
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>