[PATCH 1/3] libcsupport: Add and use rtems_libio_iovec_eval()
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Dec 16 13:41:49 UTC 2013
On 2013-12-16 14:29, Sebastian Huber wrote:
> @@ -325,11 +330,11 @@ int doErrorTest(void)
>
> /* writev -- iov_len total overflows */
> vec[0].iov_base = vec;
> - vec[0].iov_len = SIZE_MAX;
> + vec[0].iov_len = INT_MAX;
> vec[1].iov_base = vec;
> - vec[1].iov_len = SIZE_MAX;
> + vec[1].iov_len = INT_MAX;
> vec[2].iov_base = vec;
> - vec[2].iov_len = SIZE_MAX;
> + vec[2].iov_len = INT_MAX;
> puts("writev iov_len total overflows -- EINVAL");
> rc = writev(fd, vec, 3);
> if ( (rc != -1) || (errno != EINVAL) ) {
> @@ -340,11 +345,13 @@ int doErrorTest(void)
>
> /* readv -- iov_len total overflows */
> vec[0].iov_base = vec;
> - vec[0].iov_len = SIZE_MAX;
> + vec[0].iov_len = INT_MAX;
> vec[1].iov_base = vec;
> - vec[1].iov_len = SIZE_MAX;
> + vec[1].iov_len = INT_MAX;
> + vec[2].iov_base = vec;
> + vec[2].iov_len = INT_MAX;
This SIZE_MAX to INT_MAX change is nonsense. I will omit this part.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list