Fix segmentation fault in vlog.Read (header.Decode) (#1150)
Fix segmentation fault in vlog.Read (header.Decode) (#1150)

This commit fixes the segmentation fault in header.Decode that
would happen if we tried to read from a file that was mmapped
but didn't actually have any data in it. This commit fixes the
issue by checking the read is within the actual file size.
    
See https://github.com/dgraph-io/badger/pull/1150 for all
the details.

Fixes https://github.com/dgraph-io/badger/issues/1136 and
https://github.com/dgraph-io/badger/issues/1131
dgraph-io/badger,dgraph-io/badger