target: Fix segfault for 'mem2array'