7cbb46f7c6
These were not strictly needed before, as lseek would error on negative arguments, but having added open_memstream we have a virtual file pointer that assumes that it gets sane values, so we get an assertion triggered on a negative value. Best to check in one place rather than at all the relevant points.