#include <assert.h>
#include <errno.h>
+#include <limits.h>
#include <netdb.h>
#include <poll.h>
#include <unistd.h>
char buffer[MAX_REQUEST_LINE];
int found_proxy_authorization;
+ assert(length <= INT_MAX);
if (fgets(request, (int)length, client_fd) == NULL) {
if (ferror(client_fd)) {
LOG_PERROR(WARNING, "read_http_request(): fgets()");
#include "tlsproxy.h"
#include "verify.h"
+#include <assert.h>
#include <errno.h>
#include <gnutls/x509.h>
int result;
/* Hostname too long. */
+ assert(size > strlen(format));
if (size - strlen(format) <= strlen(hostname)) {
LOG(WARNING,
"get_certificate_path(): hostname too long: '%s'",