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

Commit f14e600a authored by Tomas Hozza's avatar Tomas Hozza Committed by Greg Kroah-Hartman
Browse files

tools: hv: Check retrun value of strchr call



Check return value of strchr call and dereference it only if it is
not NULL.

Signed-off-by: default avatarTomas Hozza <thozza@redhat.com>
Acked-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4d81e307
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -765,7 +765,9 @@ static void kvp_process_ipconfig_file(char *cmd,
			break;

		x = strchr(p, '\n');
		if (x)
			*x = '\0';

		strcat(config_buf, p);
		strcat(config_buf, ";");
	}