]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Protect against infloops.
authorSimon Josefsson <simon@josefsson.org>
Mon, 3 May 2010 13:19:30 +0000 (15:19 +0200)
committerSimon Josefsson <simon@josefsson.org>
Mon, 3 May 2010 13:19:30 +0000 (15:19 +0200)
tests/mini-x509.c

index 0d411a341545982a5c1c070aae7b5b01386c2ac2..40178d2a59ead632abf7ec59fa8b2858d9dc86b6 100644 (file)
@@ -191,6 +191,10 @@ main (int argc, char *argv[])
 
   do
     {
+      static int max_iter = 0;
+      if (max_iter++ > 10)
+       abort ();
+
       if (cret == GNUTLS_E_AGAIN)
        {
          cret = gnutls_handshake (client);