crow icon indicating copy to clipboard operation
crow copied to clipboard

undefined behaviour in json.h using strcat

Open Amleto opened this issue 10 years ago • 1 comments

http://en.cppreference.com/w/cpp/string/byte/strcat

https://github.com/ipkn/crow/blob/master/include/json.h#L289

throw std::runtime_error(strcat("expected number, got: ", get_type_str(t())));

Passing a literal into strcat destination is undefined behaviour.

Amleto avatar Jan 03 '16 00:01 Amleto

should we patch it already?

digitalist avatar Mar 04 '16 20:03 digitalist