Yes, which is why the output array is sized as:

ReDim tmpArr(upper1 + upper2 - 1)
but the maximum iterations you need to do is determined by the larger of the two input arrays since at each iteration you take a value from both arrays if available. Loop 1 takes item 1 from array 1 to position 1 in output, then item 1 from array 2 to position 2 in output, and repeat to loop 5 which can't take an item from array 1 (only 4 there) but does take the last item from array 2 and puts it at position 9 in the output array.