Skip to content

Commit 149d8c2

Browse files
oknetduke8253
authored andcommitted
Fix out of bound array access in ssl_session_reuse plugin (apache#6235)
(cherry picked from commit e712c08)
1 parent 1dad986 commit 149d8c2

File tree

1 file changed

+1
-1
lines changed
  • plugins/experimental/ssl_session_reuse/src

1 file changed

+1
-1
lines changed

plugins/experimental/ssl_session_reuse/src/common.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ hex_str(std::string const &str)
4343
hex_str[i * 2] = hex_chars[(c & 0xF0) >> 4];
4444
hex_str[i * 2 + 1] = hex_chars[(c & 0x0F)];
4545
}
46-
hex_str[len] = '\0';
46+
hex_str[len - 1] = '\0';
4747
return std::string(hex_str, len);
4848
}
4949

0 commit comments

Comments
 (0)