Browse Source

Fixed segfault bug in tcl_timesync

svn: 32
Bryan Drewery 23 years ago
parent
commit
4f1d1e2bd1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/tclmisc.c

+ 2 - 2
src/tclmisc.c

@@ -466,9 +466,9 @@ static int tcl_backup STDVAR
 #endif
 #endif
 static int tcl_timesync STDVAR
 static int tcl_timesync STDVAR
 {
 {
-  char buf[20];
+  char buf[50];
 
 
-  sprintf(buf, "%li %li %d", (now+timesync), now, timesync);
+  egg_snprintf(buf, sizeof buf, "%li %li %d", (now+timesync), now, timesync);
   Tcl_AppendResult(irp, buf, NULL);
   Tcl_AppendResult(irp, buf, NULL);
   return TCL_OK;
   return TCL_OK;
 }
 }