cfengine-2.2.10-snprintf_buffer_overflow.patch 456 B

123456789101112
  1. --- src/instrument.c.old 2010-10-15 22:20:58.014091858 +0200
  2. +++ src/instrument.c 2010-10-15 22:21:34.132271440 +0200
  3. @@ -542,7 +542,7 @@ while (dbcp->c_get(dbcp, &key, &value, D
  4. tthen = (time_t)then;
  5. - snprintf(datebuf,CF_BUFSIZE-1,"%s",ctime(&tthen));
  6. + snprintf(datebuf,CF_MAXVARSIZE-1,"%s",ctime(&tthen));
  7. datebuf[strlen(datebuf)-9] = '\0'; /* Chop off second and year */
  8. snprintf(addr,15,"%s",hostname+1);