CrowCpp / Crow

A Fast and Easy to use microframework for the web.
https://crowcpp.org
Other
3.33k stars 365 forks source link

Address Sanitizer exception on hello world example #539

Closed lookbusy1344 closed 1 year ago

lookbusy1344 commented 2 years ago

I was trying the hello world example with VS2022 and Address Sanitizer. When I request 127:0.0.1:18080 in Edge browser, I get an Asan error.

Its caused by the request for “/favicon.ico” which seems to sometimes have whitespace (\x10 or \x13) at the end. For some reason this causes qs_parse() in querystring.h to cause an asan error on the calls to strcspn(). I bodged a fix by stripping whitespace from the end of url in the query_string constructor. Is this just an artefact of Microsoft’s Asan implementation. Any thought?

kiner-shah commented 1 year ago

Can you provide details? Which compiler and its version, the trace returned by ASAN showing line numbers, etc.?