raft: panic on bad slice
Merge pull request #1836 from xiang90/panic_slice

raft: panic on bad slice