Skip to content

Commit

Permalink
Don't access invalid memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Mar 18, 2020
1 parent c4cc229 commit b34de2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdal/util/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ std::string Utils::escapeJSON(const std::string &str)
};
for (std::string::size_type i = 0; i < s.size();)
{
char val = s[i];
unsigned char val = s[i];
if (val < (char)replacements.size())
{
s.replace(i, 1, replacements[val]);
Expand Down

0 comments on commit b34de2c

Please sign in to comment.