Skip to content

Commit

Permalink
Fix a buffer overflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
oo13 committed Jun 14, 2023
1 parent 336b75c commit e2d9835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/spiritless_po/PluralParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ namespace SPIRITLESS_PO_DEBUG_PLURAL_PARSER_NAMESPACE {
inline void PluralParser::InsertAddress32(size_t adrs_index, size_t jump_length)
{
code.resize(code.size() + 3);
std::copy(code.begin() + adrs_index + 1, code.end(),
std::copy(code.begin() + adrs_index + 1, code.end() - 3,
code.begin() + adrs_index + 4);
code[adrs_index + 0] = (jump_length >> 24) & 0xFF;
code[adrs_index + 1] = (jump_length >> 16) & 0xFF;
Expand Down

0 comments on commit e2d9835

Please sign in to comment.