in reply to Re: How do I pre-extend a file to a specified size
in thread How do I pre-extend a file to a specified size

Actually, setting the length greater than the actual file size is undefined behavior.

  • Comment on Re: Answer: How do I pre-extend a file to a specified size