# std: Don't trust stat\(\) size in readAllAlloc fns · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92

Requested commit: 73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92

Commit: 73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92

Tree: 38e42ddabbcb8c6306d7f225154d26d3db1f58d9

Author: LemonBoy

Committer: LemonBoy

## Message

```
std: Don't trust stat() size in readAllAlloc fns

Some files such as the ones in /proc report a st_size of zero, try to
read the file anyway if we hit that case.

```

## Parents

- [26140678a5c72604f2baac3cb9d1e5f7b37b6b8d](https://git.cafe/gitcafe/zig/commit/26140678a5c72604f2baac3cb9d1e5f7b37b6b8d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/73a8c9beaa63c48b6ddaeec8d2a67b239f0dec92?format=markdown)
