Enlarge probe version field
authorJens Axboe <axboe@kernel.dk>
Mon, 16 Apr 2012 09:44:48 +0000 (11:44 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Apr 2012 09:44:48 +0000 (11:44 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
server.c
server.h

index f1c69dd37a92b59b164bad40acce9d6cb8a42a9c..456c88c8ab376a5d6af42f7d5e9b9d91863604cf 100644 (file)
--- a/server.c
+++ b/server.c
@@ -622,7 +622,7 @@ static int handle_probe_cmd(struct fio_net_cmd *cmd)
 #ifdef FIO_BIG_ENDIAN
        probe.bigendian = 1;
 #endif
 #ifdef FIO_BIG_ENDIAN
        probe.bigendian = 1;
 #endif
-       strcpy((char *) probe.fio_version, fio_version_string);
+       strncpy((char *) probe.fio_version, fio_version_string, sizeof(probe.fio_version));
 
        probe.os        = FIO_OS;
        probe.arch      = FIO_ARCH;
 
        probe.os        = FIO_OS;
        probe.arch      = FIO_ARCH;
index 59a41018ab26dec3420e69c364425917ec35297c..b7ae7ee8c5f0720004be0309bbf1bd486b5234c4 100644 (file)
--- a/server.h
+++ b/server.h
@@ -86,7 +86,7 @@ struct cmd_du_pdu {
 struct cmd_probe_pdu {
        uint8_t hostname[64];
        uint8_t bigendian;
 struct cmd_probe_pdu {
        uint8_t hostname[64];
        uint8_t bigendian;
-       uint8_t fio_version[8];
+       uint8_t fio_version[32];
        uint8_t os;
        uint8_t arch;
        uint8_t bpp;
        uint8_t os;
        uint8_t arch;
        uint8_t bpp;