Fixed missing NULL pointer check.

(cherry picked from commit 241848038c)

Conflicts:
	client/common/compatibility.c
This commit is contained in:
Armin Novak 2015-01-15 14:08:33 +01:00 committed by Bernhard Miklautz
parent dab7113f0f
commit 41313e6d70

View File

@ -252,8 +252,12 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg
if (p != NULL)
{
length = p - a;
args->argv[j + 1] = malloc(length + 1);
p = strchr(p, ':');
}
if (p != NULL)
{
length = (int) (p - a);
args->argv[j + 1] = (char*) malloc(length + 1);
CopyMemory(args->argv[j + 1], a, length);
args->argv[j + 1][length] = '\0';
p++;