Skip to content
Commit c86bbd8f authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

make varbuf functions treat AP_VARBUF_UNKNOWN consistently, improve docs

ap_varbuf_pdup(): copying the whole buffer in case strlen ==
AP_VARBUF_UNKNOWN does not make sense as the caller can not set
the exact buffer size, only a minimum. No API change as previously
the behavior with AP_VARBUF_UNKNOWN was undocumented.

regsub_core(): Checking for vb->buf is useless, it cannot be NULL
unless ap_varbuf_init has not been called.

ap_varbuf_cfg_getline(): Initially, allocate enough memory to hold
an empty line. If strlen == AP_VARBUF_UNKNOWN, use strlen(buf) instead
of undefined behavior.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1359884 13f79535-47bb-0310-9956-ffa450edef68
parent 02bebc09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment