Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b4456e2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: hab: add the sanity check for habmm_socket_query"

parents 818db166 06a19e43
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -141,7 +141,10 @@ int32_t habmm_socket_query(int32_t handle,
{
	int ret;
	uint64_t ids;
	char nm[sizeof(info->vmname_remote) + sizeof(info->vmname_local)];
	char nm[VMNAME_SIZE * 2];

	if (!info)
		return -EINVAL;

	ret = hab_vchan_query(hab_driver.kctx, handle, &ids, nm, sizeof(nm), 1);
	if (!ret) {
+3 −2
Original line number Diff line number Diff line
@@ -357,13 +357,14 @@ int32_t habmm_unimport(int32_t handle, uint32_t export_id, void *buff_shared,
 * status (success/failure)
 *
 */
#define VMNAME_SIZE 12

struct hab_socket_info {
	int32_t vmid_remote; /* habmm's vmid */
	int32_t vmid_local;
	/* name from hypervisor framework if available */
	char    vmname_remote[12];
	char    vmname_local[12];
	char    vmname_remote[VMNAME_SIZE];
	char    vmname_local[VMNAME_SIZE];
};

int32_t habmm_socket_query(int32_t handle, struct hab_socket_info *info,