`cmdargs` also needs a length check.