From e0644f6c269d6b475af22bb0d243b66e8ce4d954 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 16 Sep 2026 21:06:27 +0000 Subject: Header order changes, for some testing... Also fix a potential overflow issue in sassclient_sendv --- src/libunixonacid/sassclient_sendv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libunixonacid') 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 #include +#include #include #include #include @@ -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) ; -- cgit v1.3.1