pthread: bump min stack size
[fio.git] / engines / net.c
index 7a0fe696c1b81c7ff0dba9539387a0f16c5d7bdb..9301ccf02747268b0a878c963037f59506d3c81a 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "../fio.h"
 #include "../verify.h"
+#include "../optgroup.h"
 
 struct netio_data {
        int listenfd;
@@ -484,6 +485,9 @@ static void store_udp_seq(struct netio_data *nd, struct io_u *io_u)
 {
        struct udp_seq *us;
 
+       if (io_u->xfer_buflen < sizeof(*us))
+               return;
+
        us = io_u->xfer_buf + io_u->xfer_buflen - sizeof(*us);
        us->magic = cpu_to_le64((uint64_t) FIO_UDP_SEQ_MAGIC);
        us->bs = cpu_to_le64((uint64_t) io_u->xfer_buflen);
@@ -496,6 +500,9 @@ static void verify_udp_seq(struct thread_data *td, struct netio_data *nd,
        struct udp_seq *us;
        uint64_t seq;
 
+       if (io_u->xfer_buflen < sizeof(*us))
+               return;
+
        if (nd->seq_off)
                return;