httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1703433 - /httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c
Date Wed, 16 Sep 2015 16:22:30 GMT
Author: ylavic
Date: Wed Sep 16 16:22:30 2015
New Revision: 1703433

URL: http://svn.apache.org/r1703433
Log:
mod_test_session: fix stack corruption on 32bit systems.

Modified:
    httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c

Modified: httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c?rev=1703433&r1=1703432&r2=1703433&view=diff
==============================================================================
--- httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c (original)
+++ httpd/test/framework/trunk/c-modules/test_session/mod_test_session.c Wed Sep 16 16:22:30
2015
@@ -238,16 +238,20 @@ static int test_session_handler(request_
                     return HTTP_BAD_REQUEST;
             }
             else if (!strcmp(pair->name, "name")) {
+                apr_off_t off;
                 apr_size_t len;
-                apr_brigade_length(pair->value, 1, (apr_off_t *)&len);
+                apr_brigade_length(pair->value, 1, &off);
+                len = (apr_size_t)off;
                 fieldName = apr_pcalloc(r->pool, sizeof(char) * len + 1);
-                result = apr_brigade_flatten(pair->value, fieldName, (apr_size_t *)&len);
+                result = apr_brigade_flatten(pair->value, fieldName, &len);
             }
             else if (!strcmp(pair->name, "value")) {
+                apr_off_t off;
                 apr_size_t len;
-                apr_brigade_length(pair->value, 1, (apr_off_t *)&len);
+                apr_brigade_length(pair->value, 1, &off);
+                len = (apr_size_t)off;
                 fieldValue = apr_pcalloc(r->pool, sizeof(char) * len + 1);
-                result = apr_brigade_flatten(pair->value, fieldValue, (apr_size_t *)&len);
+                result = apr_brigade_flatten(pair->value, fieldValue, &len);
             }
             else {
                 return HTTP_BAD_REQUEST;



Mime
View raw message