client/server: ensure we don't overrun memory for long option values
[fio.git] / client.c
index 932c665c1bbcc5fbfbce810d992323c48b44fd63..637cd3fb5332dac5a552e19459fe344a807bf625 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1003,7 +1003,8 @@ static void handle_job_opt(struct fio_client *client, struct fio_net_cmd *cmd)
                return;
 
        pdu->global = le16_to_cpu(pdu->global);
-       pdu->groupid = le16_to_cpu(pdu->groupid);
+       pdu->truncated = le16_to_cpu(pdu->truncated);
+       pdu->groupid = le32_to_cpu(pdu->groupid);
 
        p = malloc(sizeof(*p));
        p->name = strdup((char *) pdu->name);