Your array is [4] bytes, but you read your array in 0-4, which goes up to 5 bytes. So you either should change your array to 5, or just read 0-3.