Merge pull request #5510 from phkelley/stash-to-index-crash Fix uninitialized stack memory and NULL ptr dereference in stash_to_index