Fix Popen buffer overflow on Popen.wait

Change-Id: I1b1a85f7c1b6c45fff4f085237bd3bffee305b10
Merge "Fix Popen buffer overflow on Popen.wait"