Weird things in chunk.c (functions only handling specific cases, unexpected behaviour)
ASK QUESTIONS IN Forums:
I wrote my own filter, and stumbled across some weird things...
- offset in chunks is used inconsistently (steal_cunks)
- chunkqueue_steal_chunk only worked with MEM_CHUNKs
- chunkqueue_append_mem(chunkqueue *cq, const char * mem, size_t len) copied only len-1 bytes.
The following patch tries to fix this; as the existing code expected the last problem, i had to change other files as well.
While i did this i started to use CONST_STR_LEN in the fixed code, so it should be more readable too.
Updated by glen over 15 years ago
- Status changed from New to Fixed
- Resolution set to fixed
Committed revision r2033.
Also available in: Atom