]> granicus.if.org Git - sudo/commitdiff
When writing length to timing file, use %u not %d as it is unsigned.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 8 Jan 2014 23:45:06 +0000 (16:45 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 8 Jan 2014 23:45:06 +0000 (16:45 -0700)
plugins/sudoers/iolog.c

index 117cb35b7c856afeab0e612abab58826b05d1969..f322bcaae861b8a821ef8576292fd56e564ae021 100644 (file)
@@ -705,11 +705,11 @@ sudoers_io_log(const char *buf, unsigned int len, int idx)
     timevalsub(&delay, &last_time);
 #ifdef HAVE_ZLIB_H
     if (iolog_compress)
-       gzprintf(io_log_files[IOFD_TIMING].fd.g, "%d %f %d\n", idx,
+       gzprintf(io_log_files[IOFD_TIMING].fd.g, "%d %f %u\n", idx,
            delay.tv_sec + ((double)delay.tv_usec / 1000000), len);
     else
 #endif
-       fprintf(io_log_files[IOFD_TIMING].fd.f, "%d %f %d\n", idx,
+       fprintf(io_log_files[IOFD_TIMING].fd.f, "%d %f %u\n", idx,
            delay.tv_sec + ((double)delay.tv_usec / 1000000), len);
     last_time.tv_sec = now.tv_sec;
     last_time.tv_usec = now.tv_usec;