test/hash: replace sprintf with snprintf