diff options
-rw-r--r-- | blkparse.c | 2 | ||||
-rw-r--r-- | blktrace.h | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -2839,7 +2839,7 @@ int main(int argc, char *argv[]) ofp = fdopen(STDOUT_FILENO, "w"); mode = _IOLBF; } else { - char ofname[128]; + char ofname[PATH_MAX]; snprintf(ofname, sizeof(ofname) - 1, "%s", output_name); ofp = fopen(ofname, "w"); @@ -2,6 +2,7 @@ #define BLKTRACE_H #include <stdio.h> +#include <limits.h> #include <byteswap.h> #include <endian.h> @@ -44,7 +45,7 @@ struct per_cpu_info { int fd; int fdblock; - char fname[128]; + char fname[PATH_MAX]; struct io_stats io_stats; |