pki: When dispatching commands, don't look beyond non-null-terminated array