dtsession/SmGlobals: use of tainted string (CID 89450)

This commit is contained in:
Jon Trulson
2014-12-27 16:12:45 -07:00
parent 1bde7d8c5c
commit 4b38955b01

View File

@@ -684,7 +684,7 @@ SetRestorePath(
*/ */
if (getenv("DISPLAY") == 0) if (getenv("DISPLAY") == 0)
{ {
sprintf(tmpDisplayName, "DISPLAY=%s", displayName); snprintf(tmpDisplayName, MAXPATHLEN, "DISPLAY=%s", displayName);
putenv(tmpDisplayName); putenv(tmpDisplayName);
} }
} }