Revert "cf-https-connect: silence clang-tidy v21 false positive"

This reverts commit 36e08e5e62.
This commit is contained in:
Viktor Szakats 2025-08-28 21:02:55 +02:00
parent e824d931f7
commit a002f5c71b
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
12 changed files with 0 additions and 21 deletions

View file

@ -180,7 +180,6 @@ static void add_answer(unsigned char *bytes, size_t *w,
size_t i = *w;
/* add answer */
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
bytes[i++] = 0xc0;
bytes[i++] = 0x0c; /* points to the query at this fixed packet index */

View file

@ -99,7 +99,6 @@ static int readline(char **buffer, size_t *bufsize, size_t *length,
}
*length = offset + line_length(*buffer + offset, bytestoread);
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
if(*(*buffer + *length - 1) == '\n')
break;
offset = *length;

View file

@ -655,7 +655,6 @@ static int rtspd_get_request(curl_socket_t sock, struct rtspd_httprequest *req)
logmsg("Read %zd bytes", got);
req->offset += (size_t)got;
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
reqbuf[req->offset] = '\0';
done_processing = rtspd_ProcessRequest(req);

View file

@ -1023,7 +1023,6 @@ static bool juggle(curl_socket_t *sockfdp,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warith-conversion"
#endif
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
FD_SET(sockfd, &fds_read);
#ifdef __DJGPP__
#pragma GCC diagnostic pop

View file

@ -560,7 +560,6 @@ static int tunnel(struct perclient *cp, fd_set *fds)
ssize_t nread;
ssize_t nwrite;
char buffer[512];
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
if(FD_ISSET(cp->clientfd, fds)) {
/* read from client, send to remote */
nread = recv(cp->clientfd, buffer, sizeof(buffer), 0);
@ -574,7 +573,6 @@ static int tunnel(struct perclient *cp, fd_set *fds)
else
return 1;
}
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
if(FD_ISSET(cp->remotefd, fds)) {
/* read from remote, send to client */
nread = recv(cp->remotefd, buffer, sizeof(buffer), 0);
@ -682,7 +680,6 @@ static bool socksd_incoming(curl_socket_t listenfd)
return FALSE;
}
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
if((clients < 2) && FD_ISSET(sockfd, &fds_read)) {
curl_socket_t newfd = accept(sockfd, NULL, NULL);
if(CURL_SOCKET_BAD == newfd) {

View file

@ -1311,7 +1311,6 @@ static curl_socket_t connect_to(const char *ipaddr, unsigned short port)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warith-conversion"
#endif
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
FD_SET(serverfd, &output);
#ifdef __DJGPP__
#pragma GCC diagnostic pop
@ -1491,7 +1490,6 @@ static void http_connect(curl_socket_t *infdp,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warith-conversion"
#endif
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
FD_SET(serverfd[i], &input);
#ifdef __DJGPP__
#pragma GCC diagnostic pop
@ -1609,7 +1607,6 @@ static void http_connect(curl_socket_t *infdp,
size_t len;
if(clientfd[i] != CURL_SOCKET_BAD) {
len = sizeof(readclient[i]) - tos[i];
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
if(len && FD_ISSET(clientfd[i], &input)) {
/* read from client */
rc = sread(clientfd[i], &readclient[i][tos[i]], len);
@ -1628,7 +1625,6 @@ static void http_connect(curl_socket_t *infdp,
}
if(serverfd[i] != CURL_SOCKET_BAD) {
len = sizeof(readserver[i])-toc[i];
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
if(len && FD_ISSET(serverfd[i], &input)) {
/* read from server */
rc = sread(serverfd[i], &readserver[i][toc[i]], len);
@ -1666,7 +1662,6 @@ static void http_connect(curl_socket_t *infdp,
}
}
if(serverfd[i] != CURL_SOCKET_BAD) {
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
if(tos[i] && FD_ISSET(serverfd[i], &output)) {
/* write to server */
rc = swrite(serverfd[i], readclient[i], tos[i]);

View file

@ -913,7 +913,6 @@ static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size)
filename = cp;
do {
bool endofit = true;
/* NOLINTNEXTLINE(clang-analyzer-security.ArrayBound) */
while(cp < &trsbuf.storage[size]) {
if(*cp == '\0') {
endofit = false;