]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
make varbuf functions treat AP_VARBUF_UNKNOWN consistently, improve docs
authorStefan Fritsch <sf@apache.org>
Tue, 10 Jul 2012 20:19:03 +0000 (20:19 +0000)
committerStefan Fritsch <sf@apache.org>
Tue, 10 Jul 2012 20:19:03 +0000 (20:19 +0000)
commitc86bbd8f7bf6331a54174f01b7710f8cd3796d4e
treea8c8bcb07610df0b6aa21341a9b1f60aa8a19ed3
parent02bebc09d6f48577f24bc3849247975f5c0864d8
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
include/util_varbuf.h
server/util.c