cachegrand
cachegrand copied to clipboard
Rewrite the human-readable protocol parser to avoid memory leaks
The current implementation of the human-readable Redis protocol parser is buggy as it searches for a space and then perform a number of additional operations expecting data to be present afterwards.
The bug is being triggered by the code at line https://github.com/danielealbano/cachegrand/blob/69c5e92b55c3851c2719a0ee26888243bf704b90/src/protocol/redis/protocol_redis_reader.c#L175
The test https://github.com/danielealbano/cachegrand/blob/69c5e92b55c3851c2719a0ee26888243bf704b90/tests/protocols/redis/test-protocol-redis-reader-inline.cpp#L510
triggers the issue