Pre-allocate result array in getAddress

Fixes issue #13159