You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2022/05/25 11:32:52 UTC

svn commit: r1901230 - in /httpd/httpd/trunk: changes-entries/md_ocsp_query.txt modules/md/md_curl.c

Author: icing
Date: Wed May 25 11:32:52 2022
New Revision: 1901230

URL: http://svn.apache.org/viewvc?rev=1901230&view=rev
Log:
  *) mod_md: a logic bug in sending long OCSP HTTP request bodies was fixed.
     This did not happen in normal use as request sizes for OSCP queries
     never exceed that length.


Added:
    httpd/httpd/trunk/changes-entries/md_ocsp_query.txt
Modified:
    httpd/httpd/trunk/modules/md/md_curl.c

Added: httpd/httpd/trunk/changes-entries/md_ocsp_query.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/changes-entries/md_ocsp_query.txt?rev=1901230&view=auto
==============================================================================
--- httpd/httpd/trunk/changes-entries/md_ocsp_query.txt (added)
+++ httpd/httpd/trunk/changes-entries/md_ocsp_query.txt Wed May 25 11:32:52 2022
@@ -0,0 +1,4 @@
+  *) mod_md: a logic bug in sending long OCSP HTTP request bodies was fixed.
+     This did not happen in normal use as request sizes for OSCP queries
+     never exceed that length.
+     [Stefan Eissing, Ronald Crane (Zippenhop LLC)]
\ No newline at end of file

Modified: httpd/httpd/trunk/modules/md/md_curl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_curl.c?rev=1901230&r1=1901229&r2=1901230&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_curl.c (original)
+++ httpd/httpd/trunk/modules/md/md_curl.c Wed May 25 11:32:52 2022
@@ -64,6 +64,7 @@ static size_t req_data_cb(void *data, si
     apr_bucket_brigade *body = baton;
     size_t blen, read_len = 0, max_len = len * nmemb;
     const char *bdata;
+    char *rdata = data;
     apr_bucket *b;
     apr_status_t rv;
     
@@ -81,9 +82,10 @@ static size_t req_data_cb(void *data, si
                     apr_bucket_split(b, max_len);
                     blen = max_len;
                 }
-                memcpy(data, bdata, blen);
+                memcpy(rdata, bdata, blen);
                 read_len += blen;
                 max_len -= blen;
+                rdata += blen;
             }
             else {
                 body = NULL;