dtsession/SmGlobals: use of tainted string (CID 89450)
authorJon Trulson <jon@radscan.com>
Sat, 27 Dec 2014 23:12:45 +0000 (16:12 -0700)
committerJon Trulson <jon@radscan.com>
Sat, 27 Dec 2014 23:12:45 +0000 (16:12 -0700)
cde/programs/dtsession/SmGlobals.c

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