lib/rand: fix bug with non uint64_t aligned random buffer fill