Hi!, last monday there was a meeting by Alo at the university of 
Salamanca, and a few of the attendees decided to take a look on cherokee.

I found several issues in the Google Code's page, and this one looked 
simple enough to go for it.
The user reported that:
"""
The cherokee-admin doesn't check the range port when you use the option 
-p. For example if you use cherokee-admin -p 100000, the program open 
aleatory port. The solution is checking the range of ports ( 0 - 65000~) 
when you use the option -p.
"""

golgi:/home/pablo/cherokee/cherokee/cherokee$ diff -u main_admin.c 
main_admin.c.new
--- main_admin.c        2008-04-23 01:46:52.000000000 +0200
+++ main_admin.c.new    2008-04-23 01:43:42.000000000 +0200
@@ -143,6 +143,11 @@
                        break;
                case 'p':
                        port = atoi(optarg);
+                       if(port>65535 || port <=0) {
+                               fprintf(stderr,
+                                       "Bad port number, port range is between 
1 and 65535\n");
+                               exit(1);
+                       }
                        break;
                case 'd':
                        document_root = strdup(optarg);
golgi:/home/pablo/cherokee/cherokee/cherokee$

I don't remember to have read about coding style at Cherokee's web. I 
haven't colaborated in any software projects, every help is welcomed.

bye.


                
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to