Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: commits

[3768] cherokee/trunk/cherokee/handler_admin.c: Improves the error management while initializing the admin handler.

 

 

Cherokee commits RSS feed   Index | Next | Previous | View Threaded


cherokee at cherokee-project

Oct 31, 2009, 12:35 PM

Post #1 of 1 (32 views)
Permalink
[3768] cherokee/trunk/cherokee/handler_admin.c: Improves the error management while initializing the admin handler.

Revision: 3768
http://svn.cherokee-project.com/changeset/3768
Author: alo
Date: 2009-10-31 20:35:55 +0100 (Sat, 31 Oct 2009)

Log Message:
-----------
Improves the error management while initializing the admin handler.
This is blind attempt of fixing bug #623. Most probably if fixes the
crash but not the functionality.

Modified Paths:
--------------
cherokee/trunk/cherokee/handler_admin.c

Modified: cherokee/trunk/cherokee/handler_admin.c
===================================================================
--- cherokee/trunk/cherokee/handler_admin.c 2009-10-31 19:12:07 UTC (rev 3767)
+++ cherokee/trunk/cherokee/handler_admin.c 2009-10-31 19:35:55 UTC (rev 3768)
@@ -131,9 +131,9 @@
ret_t
cherokee_handler_admin_init (cherokee_handler_admin_t *ahdl)
{
+ ret_t ret;
char *tmp;
off_t postl;
- ret_t ret = ret_ok;
cherokee_buffer_t post = CHEROKEE_BUF_INIT;
cherokee_buffer_t line = CHEROKEE_BUF_INIT;
cherokee_connection_t *conn = HANDLER_CONN(ahdl);
@@ -148,7 +148,11 @@

/* Process line per line
*/
- cherokee_post_walk_read (&conn->post, &post, (cuint_t) postl);
+ ret = cherokee_post_walk_read (&conn->post, &post, (cuint_t) postl);
+ if (unlikely (ret == ret_error)) {
+ conn->error_code = http_bad_request;
+ return ret_error;
+ }

for (tmp = post.buf;;) {
char *end1 = strchr (tmp, CHR_LF);

Cherokee commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.