dtsession: fixed errorlog rotation
authoralx <alx@fastestcode.org>
Thu, 2 Jul 2015 20:35:33 +0000 (22:35 +0200)
committerJon Trulson <jon@radscan.com>
Thu, 2 Jul 2015 23:50:16 +0000 (17:50 -0600)
cde/programs/dtsession/SmGlobals.c

index 51eeeef96da40f9e7044bd2c8b7b436ee072b1ac..c98e23696d4233cc1dd25dd6eb14c76cc1cfd1fc 100644 (file)
@@ -1665,7 +1665,7 @@ TrimErrorlog( void )
     
     len = strlen(home) + strlen(DtPERSONAL_CONFIG_DIRECTORY) + 2;
     if (len > MAXPATHLEN) savePath = SM_REALLOC(savePath, len);
-    snprintf(savePath, len - 1, "%s/%s", home, DtPERSONAL_CONFIG_DIRECTORY);
+    snprintf(savePath, len, "%s/%s", home, DtPERSONAL_CONFIG_DIRECTORY);
     
     /*
      * If errorlog.old exists and it is not empty, delete