static ut8 *alias_append_internal(int *out_szp, const RCmdAliasVal *first, const ut8 *second, int second_sz) {
	ut8* out;
	int out_sz;

	/* If appending to a string, always overwrite the trailing \0 */
	int bytes_from_first = first->is_str
		? first->sz - 1
		: first->sz;

	out_sz = bytes_from_first + second_sz;
	out = malloc (out_sz);
	if (!out) {
		return NULL;
	}

	/* Copy full buffer if raw bytes. Stop before \0 if string. */
	memcpy (out, first->data, bytes_from_first);
	/* Always copy all bytes from second, including trailing \0 */
	memcpy (out+bytes_from_first, second, second_sz);

	if (out_sz) {
		*out_szp = out_sz;
	}
	return out;
}
static ut8 *alias_append_internal(int *out_szp, const RCmdAliasVal *first, const ut8 *second, int second_sz) {
	ut8* out;
	int out_sz;

	 
	int bytes_from_first = first->is_str
		? first->sz - 1
		: first->sz;

	out_sz = bytes_from_first + second_sz;
	out = malloc (out_sz);
	if (!out) {
		return NULL;
	}

	 
	memcpy (out, first->data, bytes_from_first);
	 
	memcpy (out+bytes_from_first, second, second_sz);

	if (out_sz) {
		*out_szp = out_sz;
	}
	return out;
}