Recent changes (master)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit 64666f8fe2242cbe4d804df2305924a9e43e8699:

  Merge branch 'master' of ssh://git.kernel.dk/data/git/fio (2015-01-22 00:57:00 +0100)

are available in the git repository at:


  git://git.kernel.dk/fio.git master

for you to fetch changes up to 209e10374bb57565f0a61286d1ed8effd50fa95c:

  parse: ensure strings are pre-terminated when using strncpy() (2015-01-22 14:51:56 -0700)

----------------------------------------------------------------
Jens Axboe (1):
      parse: ensure strings are pre-terminated when using strncpy()

 parse.c |    2 ++
 1 file changed, 2 insertions(+)

---

Diff of recent changes:

diff --git a/parse.c b/parse.c
index e70ed20..7912212 100644
--- a/parse.c
+++ b/parse.c
@@ -506,6 +506,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 		if (!is_time && o->is_time)
 			is_time = o->is_time;
 
+		tmp[sizeof(tmp) - 1] = '\0';
 		strncpy(tmp, ptr, sizeof(tmp) - 1);
 		p = strchr(tmp, ',');
 		if (p)
@@ -705,6 +706,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
 		char tmp[128];
 		char *p1, *p2;
 
+		tmp[sizeof(tmp) - 1] = '\0';
 		strncpy(tmp, ptr, sizeof(tmp) - 1);
 
 		/* Handle bsrange with separate read,write values: */
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux