diff options
author | Jeff Moyer <jmoyer@redhat.com> | 2021-09-29 15:27:22 -0400 |
---|---|---|
committer | Jeff Moyer <jmoyer@redhat.com> | 2021-09-29 15:27:22 -0400 |
commit | 4fd9dcf7508947f9ee1d187a5edc758eef8f9524 (patch) | |
tree | 94f11881b1b756545c235209e100ec0492fabe5a | |
parent | a1bef69482289eb8b35608f1a3a4b36d7fb627e7 (diff) | |
download | libaio-4fd9dcf7508947f9ee1d187a5edc758eef8f9524.tar.gz |
Fix struct io_iocb_sockaddr padding for 32bit architectures
The io_iocb_sockaddr structure definition is missing padding for @addr
and @len, which could result in -EINVAL being returned from
io_submit() on applications compiled for 32 bit architectures. Fix
it.
This was found after Brett reported a similar bug in the
io_iocb_vector structure.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
-rw-r--r-- | src/libaio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libaio.h b/src/libaio.h index 0ceb2a9..24b4b8a 100644 --- a/src/libaio.h +++ b/src/libaio.h @@ -102,8 +102,8 @@ struct io_iocb_poll { }; /* result code is the set of result flags or -'ve errno */ struct io_iocb_sockaddr { - struct sockaddr *addr; - int len; + PADDEDptr(struct sockaddr *addr, __pad1); + PADDEDul(len, __pad2); }; /* result code is the length of the sockaddr, or -'ve errno */ struct io_iocb_common { |