summaryrefslogtreecommitdiff
path: root/buckets
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespaces in *.c.Ivan Zhakov2022-11-209-43/+43
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigade: Fix conversion from 'apr_off_t' to 'size_t', possible loss of data.Yann Ylavic2022-06-231-2/+2
| | | | | | | | | * buckets/apr_brigade.c(apr_brigade_split_boundary): "ignore" and "inbytes" vars are size_t and used as such. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902194 13f79535-47bb-0310-9956-ffa450edef68
* apr_buckets_file: Always use the given pool for FILE buckets set aside.Yann Ylavic2022-01-071-4/+1
| | | | | | | | | | Using an ancestor pool might race if the bucket is reopened (XTHREAD) or mmap()ed later in file_bucket_read(), while there is nothing wrong with both the bucket and the file having the given/same lifetime. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1896812 13f79535-47bb-0310-9956-ffa450edef68
* Fix pointer arithmetic for 'void *'Mladen Turk2021-12-011-5/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895464 13f79535-47bb-0310-9956-ffa450edef68
* Remove begin.Graham Leggett2021-10-251-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894553 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigade_split_boundary: Provide a memmem implementation on platforms thatGraham Leggett2021-10-251-0/+30
| | | | | | | do not have one. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894551 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigade_split_boundary: Make sure the ignore offset is reset afterGraham Leggett2021-10-211-0/+4
| | | | | | | each sending of a bucket downstream. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894446 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigade_split_boundary: Use memmem and memcmp for comparison, allowingGraham Leggett2021-10-211-6/+6
| | | | | | | binary boundaries. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894441 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigade_split_boundary: Rather than shaving one byte fromGraham Leggett2021-10-201-8/+7
| | | | | | | a bucket, ignore the byte instead on the next go-round. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894423 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigade_split_boundary: Correctly account for the bytes we've written.Graham Leggett2021-10-201-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894420 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigades: Add apr_brigade_split_boundary(), allowing us to splitGraham Leggett2021-10-191-0/+263
| | | | | | | brigades on boundaries of arbitrary length. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894380 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1893204: restore apr_file_setaside() semantics, fix ↵Yann Ylavic2021-09-191-6/+28
| | | | | | | | | | | | | | | file_bucket_setaside(). apr_file_setasidea() needs to invalidate the old file descriptor per semantics: * @remark After calling this function, old_file may not be used So to avoid the setaside issue with splitted file buckets, file_bucket_setaside() will now apr_file_dup() instead of apr_file_setaside() when the bucket is shared (i.e. refcount > 1). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893445 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_brigade.c (apr_brigade_cleanup): Non-debug builds shouldJoe Orton2020-03-111-3/+11
| | | | | | | | | not check for brigade memory corruption; debug builds should abort rather than fail silently (since all callers ignore the rv) if corruption is detected. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1875098 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_buckets_refcount.c (apr_bucket_shared_copy):Joe Orton2019-08-291-2/+1
| | | | | | | Simplify code, allowing tail-call optimization, no functional change. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866064 13f79535-47bb-0310-9956-ffa450edef68
* * We cannot access list any longer after we called apr_allocator_free as it ↵Ruediger Pluem2018-01-261-2/+11
| | | | | | points to memory we just freed. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1822315 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1788334: apr_allocator_align() should take an allocator asYann Ylavic2017-04-032-4/+6
| | | | | | | | | | | | argument, for better scalability of the API. Update apr_bucket_alloc_aligned_floor() from r1788335 accordingly. Suggested by ivan. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1789947 13f79535-47bb-0310-9956-ffa450edef68
* apr_buckets: Add apr_bucket_file_set_buf_size() which allows to configureYann Ylavic2017-03-232-3/+35
| | | | | | | | the size of the buffer used to read files. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1788335 13f79535-47bb-0310-9956-ffa450edef68
* Don't corrupt the bucket allocator in out-of-mem situationStefan Fritsch2013-01-261-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1438960 13f79535-47bb-0310-9956-ffa450edef68
* Add valgrind supportStefan Fritsch2013-01-261-3/+12
| | | | | | | | | | | | | | | | | Teach valgrind about apr pools, allocators, and bucket allocators if --with-valgrind is passed to configure. This has less impact on program behavior and performance than compiling with complete pool-debugging. Even with valgrind support compiled in, the performance impact if not running under valgrind should be minimal. It may make sense to use pool-debugging together with valgrind support because pool-debugging does not help with allocators and bucket allocators. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1438957 13f79535-47bb-0310-9956-ffa450edef68
* Revert r789061, r758414, and r758398 which are leftovers of the palloc usesStefan Fritsch2013-01-191-8/+28
| | | | | | | | | | | | malloc experiment that were forgotten when reverting to the old code in r795598. This fixes the apr_allocator created by apr_bucket_alloc_create() being leaked by apr_bucket_alloc_destroy. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1435605 13f79535-47bb-0310-9956-ffa450edef68
* Make sure we abort, even if the abortfunc returnsStefan Fritsch2012-11-061-2/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1406088 13f79535-47bb-0310-9956-ffa450edef68
* If out of mem, abort instead of crashing. Use the pool's abort functionStefan Fritsch2012-10-271-4/+7
| | | | | | | if it has one. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402907 13f79535-47bb-0310-9956-ffa450edef68
* Make apr_brigade_(v)putstrs more efficient by using apr_brigade_writevStefan Fritsch2012-10-271-4/+17
| | | | | | | instead of apr_brigade_write git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402903 13f79535-47bb-0310-9956-ffa450edef68
* Fix potential data corruption in apr_brigade_write() and friends ifStefan Fritsch2012-10-271-3/+9
| | | | | | | | | the last bucket of the brigade is a heap bucket that has been split, and there are still references to the next part of the original bucket in use. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402897 13f79535-47bb-0310-9956-ffa450edef68
* Remove duplicated logic in apr_brigade_puts().Stefan Fritsch2012-10-271-23/+1
| | | | | | | | PR: 53740 Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402870 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigades: prevent infinite loop on a corrupt brigadeNick Kew2011-05-131-0/+10
| | | | | | | PR 51062 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1102687 13f79535-47bb-0310-9956-ffa450edef68
* SECURITY: CVE-2010-1623 (cve.mitre.org)Jeff Trawick2010-10-011-1/+12
| | | | | | | | | | Fix a denial of service attack against apr_brigade_split_line(). Submitted by: sf Reviewed by: trawick, jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1003491 13f79535-47bb-0310-9956-ffa450edef68
* Add debugging traps for use-after-destroy of a brigade:Joe Orton2010-06-051-2/+18
| | | | | | | | | | | | | | | | * buckets/apr_brigade.c (apr_brigade_cleanup): Check brigade consistency. (apr_brigade_destroy) [APR_BUCKET_DEBUG]: Check brigade consistency before destroying it, and clear b->p, b->bucket_alloc after. * include/apr_buckets.h (APR_BRIGADE_CHECK_CONSISTENCY): assert that b->p and b->bucket_alloc are non-NULL. Suggested by: sf git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@951762 13f79535-47bb-0310-9956-ffa450edef68
* Use the APR_FOPEN_* constants instead of the deprecated APR_* constantsGraham Leggett2010-03-021-2/+2
| | | | | | | within code outside the file_io code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@917837 13f79535-47bb-0310-9956-ffa450edef68
* Convert various APU_DECLARE into APR_DECLARE.Bojan Smojver2009-07-1613-66/+66
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@794523 13f79535-47bb-0310-9956-ffa450edef68
* more NetWare build tweaks.Guenter Knauf2009-06-281-261/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789154 13f79535-47bb-0310-9956-ffa450edef68
* more NetWare build tweaks.Guenter Knauf2009-06-281-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789137 13f79535-47bb-0310-9956-ffa450edef68
* Remove dead debug code referencing apr_pool_allocator_get, which doesn't ↵Paul Querna2009-06-281-5/+0
| | | | | | exist anymore. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789061 13f79535-47bb-0310-9956-ffa450edef68
* fixed NetWare build.Guenter Knauf2009-06-271-0/+261
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789020 13f79535-47bb-0310-9956-ffa450edef68
* * Fix off by one overflow in apr_brigade_vprintf.Ruediger Pluem2009-04-241-3/+0
| | | | | | | | | | | For the gory details see http://mail-archives.apache.org/mod_mbox/apr-dev/200904.mbox/%3c49F21CD2.5020105@collab.net%3e Submitted by: C. Michael Pilato <cmpilato collab.net> Reviewed by: rpluem, trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@768417 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_buckets_alloc.c (alloc_cleanup): UnconditionallyJoe Orton2009-03-251-5/+1
| | | | | | | destroy the allocator since it's unconditionally created. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@758414 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_buckets_alloc.c (apr_bucket_alloc_create): Use a newJoe Orton2009-03-251-8/+3
| | | | | | | allocator since the pool->allocator association has gone. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@758398 13f79535-47bb-0310-9956-ffa450edef68
* Merge APR-Util trunk into APR.Paul Querna2009-03-2413-0/+2122
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@757704 13f79535-47bb-0310-9956-ffa450edef68
* this shouldn't be here any more...Greg Stein2000-12-071-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60906 13f79535-47bb-0310-9956-ffa450edef68
* Remove all files from the buckets directory. This is in preparationRyan Bloom2000-08-1216-5454/+0
| | | | | | | for committing a patch that actually implements filtering. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60498 13f79535-47bb-0310-9956-ffa450edef68
* Fix the patch after Jeff removed the last apr_filter* from theRyan Bloom2000-08-051-9/+0
| | | | | | | request_rec. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60480 13f79535-47bb-0310-9956-ffa450edef68
* - remove patch #3 since it has been appliedGreg Stein2000-08-057-1190/+267
| | | | | | | | - regenerate patch #2 given ap_ -> apr_ rename and presence of patch #3 - update the README git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60479 13f79535-47bb-0310-9956-ffa450edef68
* Make the patch apply and compile again after the apr_ rename.Ryan Bloom2000-08-052-103/+126
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60478 13f79535-47bb-0310-9956-ffa450edef68
* prefix libapr functions and types with apr_Doug MacEachern2000-08-029-146/+146
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60470 13f79535-47bb-0310-9956-ffa450edef68
* Make ap_bucket_list_destroy a static function. It should never be usedRyan Bloom2000-08-012-28/+14
| | | | | | | outside the buckets code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60466 13f79535-47bb-0310-9956-ffa450edef68
* Commit a bunch of docs for the bucket brigades code. This should clearRyan Bloom2000-08-011-14/+149
| | | | | | | | up where things are and where I would like to see them go. Please, if there are any questions, or if I have been unclear, ask. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60465 13f79535-47bb-0310-9956-ffa450edef68
* Update the bucket brigade patch to work with the latest code. This isRyan Bloom2000-07-311-220/+306
| | | | | | | | | | | | a much smaller patch than previous ones IMO. It also contains a lot of comments to help explain what is happening. This patch works with all legacy modules, as well as newer modules. I have removed the chunking filter with the understanding that it was mucking up the patch, and making things hard to follow. After we decide on a filter design, adding chunking back in should be easy to do. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60464 13f79535-47bb-0310-9956-ffa450edef68
* bucket_brigade is too long to type in every function name. This justRyan Bloom2000-07-312-19/+19
| | | | | | | | | changes to names of all of the brigade functions to ap_brigade_foo. I don't think this should cause any confusion, and it sure makes coding this stuff much easier. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60463 13f79535-47bb-0310-9956-ffa450edef68
* Combine the create and write functions. I am leaving the write functionRyan Bloom2000-07-315-18/+32
| | | | | | | | | | | | pointer in the structure because I think it is still useful, but having one API to create a bucket and put data in it is much cleaner. If we decide to have a list of free buckets, then the create function may not call malloc, it may grab a bucket off the free list. Regardless of where the memory comes from, create's job is to grab the memory from someplace and fill out the structure. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60462 13f79535-47bb-0310-9956-ffa450edef68
* "flush_filters" is a misnomer. rename it. also shift it so that we can callGreg Stein2000-07-251-0/+49
| | | | | | | it from sub-request finalization. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60450 13f79535-47bb-0310-9956-ffa450edef68