wkhtmltopdf/wkhtmltopdf — pull request #1768 by theirix (2014-06-10 20:52:21+00:00)
Title: Allow to use long argument list

Refactored entrance method to remove hardcoded argument list and buffer
sizes. Memory for arguments is allocated dynamically, lines from stdin
are read with growing buffer.

Rationale. Wkhtmltopdf have several hardcoded limits. They are quite large but we have already broken with large argument input files. This patch removes hardcoded limits and allows to use truly infinite argument/buffer sizes. Lack of POSIX getline function on several platforms requires to write a portable replacement fgets_large. Tested for FreeBSD, untested for Windows and Linux (should work).