diff --git a/include/ssp/socket.h b/include/ssp/socket.h index 6c0051ad72dc..30a8f0adf1ea 100644 --- a/include/ssp/socket.h +++ b/include/ssp/socket.h @@ -101,11 +101,12 @@ __ssp_redirect_raw_impl(ssize_t, recvmmsg, recvmmsg, const struct timespec *__restrict timeout)) { const size_t vecsz = __ssp_bos(hdrvec); + size_t i; if (vecsz != (size_t)-1 && vecsz / sizeof(*hdrvec) < vlen) __chk_fail(); - for (size_t i = 0; i < vlen; i++) { + for (i = 0; i < vlen; i++) { __ssp_check_msghdr(&hdrvec[i].msg_hdr); } diff --git a/include/ssp/ssp.h b/include/ssp/ssp.h index bdc14137d45b..a161df31d3d4 100644 --- a/include/ssp/ssp.h +++ b/include/ssp/ssp.h @@ -89,7 +89,7 @@ __ssp_redirect_raw_impl(rtype, fun, symbol, args) { \ #include -static inline int +__ssp_inline int __ssp_overlap(const void *leftp, const void *rightp, __size_t sz) { __uintptr_t left = (__uintptr_t)leftp; @@ -112,11 +112,12 @@ __ssp_inline void __ssp_check_iovec(const struct iovec *iov, int iovcnt) { const size_t iovsz = __ssp_bos(iov); + int i; if (iovsz != (size_t)-1 && iovsz / sizeof(*iov) < (size_t)iovcnt) __chk_fail(); - for (int i = 0; i < iovcnt; i++) { + for (i = 0; i < iovcnt; i++) { if (__ssp_bos(iov[i].iov_base) < iov[i].iov_len) __chk_fail(); }