diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-09-16 21:06:27 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-09-16 21:06:27 +0000 |
| commit | e0644f6c269d6b475af22bb0d243b66e8ce4d954 (patch) | |
| tree | 170c061929407b17f0adf10ba02b17c2b9cb3c9a /src/libunixonacid | |
| parent | 4b2cbddf2fdd394d4a91735237b266f9b026123c (diff) | |
| download | skalibs-e0644f6c269d6b475af22bb0d243b66e8ce4d954.tar.gz | |
Header order changes, for some testing...
Also fix a potential overflow issue in sassclient_sendv
Diffstat (limited to 'src/libunixonacid')
| -rw-r--r-- | src/libunixonacid/sassclient_sendv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libunixonacid/sassclient_sendv.c b/src/libunixonacid/sassclient_sendv.c index e31de07..ae8b61d 100644 --- a/src/libunixonacid/sassclient_sendv.c +++ b/src/libunixonacid/sassclient_sendv.c @@ -1,7 +1,7 @@ /* ISC license. */ -#include <sys/uio.h> #include <stdint.h> +#include <sys/uio.h> #include <errno.h> #include <time.h> #include <limits.h> @@ -25,7 +25,7 @@ int sassclient_sendv (sassclient *a, uint32_t *cid, uint32_t flags, uint32_t tim sassclient_data *p ; char pack[21] = "+" ; struct iovec v[1 + n] ; - if (len + 17 > UINT32_MAX) return (errno = ENAMETOOLONG, 0) ; + if (len > UINT32_MAX - 17) return (errno = ENAMETOOLONG, 0) ; e = pthread_mutex_tailock(&a->connection_mutex, deadline, stamp) ; if (e) return (errno = e, 0) ; |
