mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-11 16:21:12 +00:00
use putenv () with the COMPUTE environment as it was before
This commit is contained in:
parent
5d14e04f9c
commit
bd9fdc1849
12
src/shared.c
12
src/shared.c
@ -260,20 +260,8 @@ void setup_environment_variables ()
|
|||||||
|
|
||||||
snprintf (display, sizeof (display) - 1, "DISPLAY=%s", compute);
|
snprintf (display, sizeof (display) - 1, "DISPLAY=%s", compute);
|
||||||
|
|
||||||
// we only use this check to avoid "tainted string" warnings
|
|
||||||
|
|
||||||
u32 display_len_max = sizeof (display);
|
|
||||||
|
|
||||||
u32 display_len = strnlen (display, display_len_max);
|
|
||||||
|
|
||||||
if (display_len > 0) // should be always true
|
|
||||||
{
|
|
||||||
if (display_len < display_len_max) // some upper bound is always good
|
|
||||||
{
|
|
||||||
putenv (display);
|
putenv (display);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (getenv ("DISPLAY") == NULL)
|
if (getenv ("DISPLAY") == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user