c9s / r3

libr3 is a high-performance path dispatching library. It compiles your route paths into a prefix tree (trie). By using the constructed prefix trie in the start-up time, you may dispatch your routes with efficiency
http://c9s.github.com/r3/bench.html
MIT License
813 stars 83 forks source link

Correcting buffer over-read errors #142

Closed bjosv closed 2 years ago

bjosv commented 2 years ago

When inserting multiple routes with common slug patterns there are memory reads beyond end of strings.

The scenario is added as a testcase and can be visualized by the address-sanitizer when built using: CFLAGS="-fno-omit-frame-pointer -fsanitize=address" cmake ..

The issues are indicated by the sanitizer as buffer-overflow.

c9s commented 2 years ago

thank you!