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

Commit 8538083a authored by Kaushal Kumar's avatar Kaushal Kumar
Browse files

soc: qcom: socinfo: Handle null pointer dereference



socinfo_get_build_id may return NULL and subsequently
get dereferenced in msm_get_build_id. Fix it.

Change-Id: I03861c1c86b1b77ab3455f4fd5cdc98c08723b3b
Signed-off-by: default avatarKaushal Kumar <kaushalk@codeaurora.org>
parent 93c1360c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -780,8 +780,10 @@ msm_get_build_id(struct device *dev,
		   struct device_attribute *attr,
		   char *buf)
{
	if (socinfo_get_build_id())
		return snprintf(buf, PAGE_SIZE, "%-.32s\n",
				socinfo_get_build_id());
	return 0;
}

static ssize_t