Skip to content

Commit

Permalink
Fix out of bounds memory access (#473)
Browse files Browse the repository at this point in the history
If the attribute for an XML entry is over 2000 characters long and happens
to end with a `\`, the iterator can be incremented past the end of the string.
  • Loading branch information
rm5248 authored Feb 2, 2025
1 parent 323945b commit e46c77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/cpp/optionconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ LogString OptionConverter::convertSpecialChars(const LogString& s)
{
c = *i++;

if (c == 0x5C /* '\\' */)
if (i != s.end() && c == 0x5C /* '\\' */)
{
c = *i++;

Expand Down

0 comments on commit e46c77a

Please sign in to comment.