cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Fix some UBs and memory leaks

Open dimhotepus opened this issue 2 years ago • 0 comments

  • Do not leak clocale on _create_locale failed.
  • Add missed class member initializers to prevent UB on access to them.
  • Do not perform string -> char* -> string casts, use string directly.

Found by PVS-Studio https://pvs-studio.com/en/

dimhotepus avatar May 19 '23 01:05 dimhotepus