Revert "Fix preventing from heap overwrite in capture command"

This reverts commit c76e4c36f9282900ade46ae88962a1e60e75f337.

Change-Id: I140962588386b79a3eb7e2831d722b576370d474