Skip to content

Commit f875589

Browse files
authored
Merge commit from fork
Fix buffer overflow in hex_decode.cc
2 parents 566db92 + 352b705 commit f875589

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/actions/transformations/hex_decode.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static inline int inplace(std::string &value) {
2828
auto d = reinterpret_cast<unsigned char *>(value.data());
2929
const auto *data = d;
3030

31-
for (int i = 0; i <= len - 2; i += 2) {
31+
for (std::string::size_type i = 0; i + 1 < len; i += 2) {
3232
*d++ = utils::string::x2c(&data[i]);
3333
}
3434

0 commit comments

Comments
 (0)