[BACK]Return to cgi.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/cgi.c between version 1.94 and 1.95

version 1.94, 2014/08/17 03:24:47 version 1.95, 2014/08/21 16:05:21
Line 18 
Line 18 
 #include "config.h"  #include "config.h"
   
 #include <sys/types.h>  #include <sys/types.h>
   #include <sys/time.h>
   
 #include <ctype.h>  #include <ctype.h>
 #include <errno.h>  #include <errno.h>
Line 1029  int
Line 1030  int
 main(void)  main(void)
 {  {
         struct req       req;          struct req       req;
           struct itimerval itimer;
         const char      *path;          const char      *path;
         const char      *querystring;          const char      *querystring;
         int              i;          int              i;
   
           /* Poor man's ReDoS mitigation. */
   
           itimer.it_value.tv_sec = 1;
           itimer.it_value.tv_usec = 0;
           itimer.it_interval.tv_sec = 1;
           itimer.it_interval.tv_usec = 0;
           if (setitimer(ITIMER_VIRTUAL, &itimer, NULL) == -1) {
                   fprintf(stderr, "setitimer: %s\n", strerror(errno));
                   pg_error_internal();
                   return(EXIT_FAILURE);
           }
   
         /* Scan our run-time environment. */          /* Scan our run-time environment. */
   

Legend:
Removed from v.1.94  
changed lines
  Added in v.1.95

CVSweb