R_API bool r_buf_append_buf_slice(RBuffer *b, RBuffer *a, ut64 offset, ut64 size) {
	r_return_val_if_fail (b && a && !b->readonly, false);
	ut8 *tmp = R_NEWS (ut8, size);
	bool res = false;

	if (!tmp) {
		return false;
	}
	st64 r = r_buf_read_at (a, offset, tmp, size);
	if (r < 0) {
		goto err;
	}
	res = r_buf_append_bytes (b, tmp, r);
err:
	free (tmp);
	return res;
}
R_API bool r_buf_append_buf_slice(RBuffer *b, RBuffer *a, ut64 offset, ut64 size) {
	r_return_val_if_fail (b && a && !b->readonly, false);
	ut8 *tmp = R_NEWS (ut8, size);
	bool res = false;

	if (!tmp) {
		return false;
	}
	st64 r = r_buf_read_at (a, offset, tmp, size);
	if (r < 0) {
		goto err;
	}
	res = r_buf_append_bytes (b, tmp, r);
err:
	free (tmp);
	return res;
}