The loop in FormatMoney accesses str[i-2] without first checking that i >= 2. If str.size() < 3, this could read out of bounds.
Fix by adding explicit bounds check i >= 2 to the loop condition.
The loop in FormatMoney accesses str[i-2] without first checking that i >= 2. If str.size() < 3, this could read out of bounds.
Fix by adding explicit bounds check i >= 2 to the loop condition.
The loop in FormatMoney accesses str[i-2] without first checking
that i >= 2. If str.size() < 3, this could read out of bounds.
Fix by adding explicit bounds check i >= 2 to the loop condition.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process. A summary of reviews will appear here.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
ai slop llm spam