pdfunite: Fix stack overflow on broken file

Fixes issue #741
6 jobs for master in 7 minutes and 41 seconds (queued for 1 second)
Status Name Job ID Coverage
  Build
passed build #177057

00:03:36

passed build_android #177062

00:01:00

passed build_clang_libcpp #177058

00:03:35

passed build_clazy #177061

00:04:46

passed build_gcc_49 #177059

00:05:34

passed build_mingw64_fedora #177060

00:07:41