Security fixes brought forward from 0.9.7.
[openssl.git] / apps / s_time.c
index 752158460aaf49437d935482c6de5fd687129f27..da7383ca21d41f3c9958d21ce2362b3ebc1e236e 100644 (file)
 #undef BUFSIZZ
 #define BUFSIZZ 1024*10
 
+#define MYBUFSIZ 1024*8
+
 #undef min
 #undef max
 #define min(a,b) (((a) < (b)) ? (a) : (b))
@@ -320,6 +322,11 @@ static int parseArgs(int argc, char **argv)
                {
                if (--argc < 1) goto bad;
                s_www_path= *(++argv);
+               if(strlen(s_www_path) > MYBUFSIZ-100)
+                       {
+                       BIO_printf(bio_err,"-www option too long\n");
+                       badop=1;
+                       }
                }
        else if(strcmp(*argv,"-bugs") == 0)
            st_bugs=1;