1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-04-21 17:49:04 +00:00

Merge pull request #1109 from philsmd/master

tainted string: maybe strdup () helps us out
This commit is contained in:
Jens Steube 2017-02-15 13:59:41 +01:00 committed by GitHub
commit ad24f5d2ed

View File

@ -256,6 +256,10 @@ void setup_environment_variables ()
if (compute)
{
// fix for coverity "TAINTED_STRING" issue (using the environment variable directly could be "dangerous")
compute = strdup (compute);
static char display[100];
u32 compute_len_max = sizeof (display);
@ -273,6 +277,8 @@ void setup_environment_variables ()
putenv (display);
}
}
free (compute);
}
else
{