Author: mhabersack
Date: 2007-03-28 17:00:46 -0500 (Wed, 28 Mar 2007)
New Revision: 75117

Modified:
   trunk/mod_mono/ChangeLog
   trunk/mod_mono/src/mod_mono.c
Log:
2007-03-28  Marek Habersack  <[EMAIL PROTECTED]>

        * src/mod_mono.c (do_command): abort when either xsp sends us size
        of -1 in the GET_CLIENT_BLOCK command or when ap_get_client_block
        returns -1 as the result of client breaking the connection. This
        action prevents an exception later on in xsp.



Modified: trunk/mod_mono/ChangeLog
===================================================================
--- trunk/mod_mono/ChangeLog    2007-03-28 21:54:18 UTC (rev 75116)
+++ trunk/mod_mono/ChangeLog    2007-03-28 22:00:46 UTC (rev 75117)
@@ -1,3 +1,10 @@
+2007-03-28  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * src/mod_mono.c (do_command): abort when either xsp sends us size
+       of -1 in the GET_CLIENT_BLOCK command or when ap_get_client_block
+       returns -1 as the result of client breaking the connection. This
+       action prevents an exception later on in xsp.
+
 2006-11-21 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * src/mod_mono.c:

Modified: trunk/mod_mono/src/mod_mono.c
===================================================================
--- trunk/mod_mono/src/mod_mono.c       2007-03-28 21:54:18 UTC (rev 75116)
+++ trunk/mod_mono/src/mod_mono.c       2007-03-28 22:00:46 UTC (rev 75117)
@@ -688,8 +688,16 @@
                        break;
 
                i = INT_FROM_LE (i);
+               if (i < 0) {
+                       DEBUG_PRINT (2, "xsp sent us size == %d: not 
processing", i);
+                       abort();
+               }
                str = get_client_block_buffer (r, (uint32_t) i, &actual_size);
                i = ap_get_client_block (r, str, actual_size);
+               if (i < 0) {
+                       DEBUG_PRINT (2, "our block has size %d: not sending to 
xsp", i);
+                       abort();
+               }
                i = LE_FROM_INT (i);
                status = write_data (sock, &i, sizeof (int32_t));
                i = INT_FROM_LE (i);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to