Add size limiting to file read() for safety
Add size limiting to file read() for safety

It was recently found that poor coding practices allowed the reading of
arbitrary files due to a lack of input sanitisation. That particular
problem will be addressed in a subsequent commit, but as an additional
measure we'll read no more than 1MiB from the file that stores the URL.

This should mitigate problems in the event that unexpected files are
opened (eg. /dev/zero).

anchor/lzma-url-shortener