Skip to content

Commit 93b944e

Browse files
committed
Fixed #697.
Removed out of range array dereference.
1 parent 0a65c44 commit 93b944e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/msgpack/v1/adaptor/ext.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ class ext {
4343
return static_cast<int8_t>(m_data[0]);
4444
}
4545
const char* data() const {
46-
return &m_data[1];
46+
return &m_data[0] + 1;
4747
}
4848
char* data() {
49-
return &m_data[1];
49+
return &m_data[0] + 1;
5050
}
5151
uint32_t size() const {
5252
return static_cast<uint32_t>(m_data.size()) - 1;

0 commit comments

Comments
 (0)