]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - src/verify.c
Add two assert()s.
[tlsproxy/tlsproxy.git] / src / verify.c
index d4002764dbfece338008632c794ce226dade233c..f6742361f3e9d111a4bc779c246a10d11914a6fe 100644 (file)
@@ -20,6 +20,7 @@
 #include "tlsproxy.h"
 #include "verify.h"
 
+#include <assert.h>
 #include <errno.h>
 
 #include <gnutls/x509.h>
@@ -180,6 +181,7 @@ static int get_certificate_path(const char *format,
     int result;
 
     /* Hostname too long. */
+    assert(size > strlen(format));
     if (size - strlen(format) <= strlen(hostname)) {
         LOG(WARNING,
             "get_certificate_path(): hostname too long: '%s'",