From d0963ac404a6151516f3c75b06c2d7aa5d895885 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 30 Nov 2005 15:31:40 +0100 Subject: [PATCH] [PATCH] fio: ->verror need not be so large --- fio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fio.h b/fio.h index 94165fc..f6b5889 100644 --- a/fio.h +++ b/fio.h @@ -66,7 +66,7 @@ struct group_run_stats { struct thread_data { char file_name[256]; char directory[256]; - char verror[256]; + char verror[80]; pthread_t thread; int thread_number; int groupid; @@ -174,7 +174,7 @@ struct thread_data { do { \ int e = (err); \ (td)->error = e; \ - sprintf(td->verror, "file:%s:%d, error=%s", __FILE__, __LINE__, strerror(e)); \ + snprintf(td->verror, sizeof(td->verror) - 1, "file:%s:%d, error=%s", __FILE__, __LINE__, strerror(e)); \ } while (0) extern int parse_jobs_ini(char *); -- 2.25.1