diff options
-rw-r--r-- | include/m_system.h | 4 | ||||
-rw-r--r-- | libs/libsignal/src/signal.def | 2 | ||||
-rw-r--r-- | libs/win32/mir_core.lib | bin | 490172 -> 490172 bytes | |||
-rw-r--r-- | libs/win64/mir_core.lib | bin | 495398 -> 495398 bytes | |||
-rw-r--r-- | src/mir_app/src/netlib_http.cpp | 13 | ||||
-rw-r--r-- | src/mir_core/src/binbuffer.cpp | 10 | ||||
-rw-r--r-- | src/mir_core/src/mir_core.def | 2 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 2 |
8 files changed, 18 insertions, 15 deletions
diff --git a/include/m_system.h b/include/m_system.h index e64f4376f1..706820f8fc 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -470,7 +470,7 @@ public: class MIR_CORE_EXPORT MBinBuffer { - char *m_buf = nullptr; + uint8_t *m_buf = nullptr; public: MBinBuffer(); @@ -479,7 +479,7 @@ public: ~MBinBuffer(); MBinBuffer& operator=(MBinBuffer &&) noexcept; - __forceinline char* data() const { return m_buf; } + __forceinline uint8_t* data() const { return m_buf; } __forceinline bool isEmpty() const { return m_buf == nullptr; } size_t length() const; diff --git a/libs/libsignal/src/signal.def b/libs/libsignal/src/signal.def index 8d8f0ad10e..8d4bb1820f 100644 --- a/libs/libsignal/src/signal.def +++ b/libs/libsignal/src/signal.def @@ -62,9 +62,11 @@ EXPORTS ratchet_identity_key_pair_get_private signal_protocol_key_helper_generate_identity_key_pair signal_protocol_key_helper_generate_signed_pre_key + session_signed_pre_key_get_id session_signed_pre_key_get_key_pair session_signed_pre_key_get_signature session_signed_pre_key_get_signature_len + session_signed_pre_key_deserialize session_pre_key_get_key_pair signal_protocol_key_helper_generate_pre_keys signal_protocol_key_helper_key_list_element diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib Binary files differindex 5c70ef7885..6203f0ad20 100644 --- a/libs/win32/mir_core.lib +++ b/libs/win32/mir_core.lib diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib Binary files differindex 1d1eccd033..2e9bfd6b52 100644 --- a/libs/win64/mir_core.lib +++ b/libs/win64/mir_core.lib diff --git a/src/mir_app/src/netlib_http.cpp b/src/mir_app/src/netlib_http.cpp index a93caf7116..7c94db57ca 100644 --- a/src/mir_app/src/netlib_http.cpp +++ b/src/mir_app/src/netlib_http.cpp @@ -777,7 +777,7 @@ MIR_APP_DLL(NETLIBHTTPREQUEST*) Netlib_RecvHttpHeaders(HNETLIBCONN hConnection, nlhr->headers = (NETLIBHTTPHEADER*)mir_calloc(sizeof(NETLIBHTTPHEADER) * headersCount); headersCount = 0; - for (char *pbuffer = buf.data();; headersCount++) { + for (char *pbuffer = (char*)buf.data();; headersCount++) { char *peol = strchr(pbuffer, '\n'); if (peol == nullptr || peol == pbuffer || (peol == (pbuffer+1) && *pbuffer == '\r')) break; @@ -970,22 +970,23 @@ static int NetlibHttpRecvChunkHeader(NetlibConnection *nlc, bool first, uint32_t buf.append(data, recvResult); // add chunk - const char *peol1 = (const char*)memchr(buf.data(), '\n', buf.length()); + auto *peol1 = (const char*)memchr(buf.data(), '\n', buf.length()); if (peol1 == nullptr) continue; - int cbRest = int(peol1 - buf.data()) + 1; + auto *pStart = (const char *)buf.data(); + int cbRest = int(peol1 - pStart) + 1; const char *peol2 = first ? peol1 : (const char*)memchr(peol1 + 1, '\n', buf.length() - cbRest); if (peol2 == nullptr) continue; - int sz = peol2 - buf.data() + 1; - int r = strtol(first ? buf.data() : peol1 + 1, nullptr, 16); + int sz = peol2 - pStart + 1; + int r = strtol(first ? pStart : peol1 + 1, nullptr, 16); if (r == 0) { const char *peol3 = strchr(peol2 + 1, '\n'); if (peol3 == nullptr) continue; - sz = peol3 - buf.data() + 1; + sz = peol3 - pStart + 1; } buf.remove(sz); // remove all our data from buffer nlc->foreBuf.appendBefore(buf.data(), buf.length()); diff --git a/src/mir_core/src/binbuffer.cpp b/src/mir_core/src/binbuffer.cpp index 3b961b489b..fbde7bfb4d 100644 --- a/src/mir_core/src/binbuffer.cpp +++ b/src/mir_core/src/binbuffer.cpp @@ -62,7 +62,7 @@ struct BufImpl } }; -__forceinline BufImpl* ptr2buf(char *p) +__forceinline BufImpl* ptr2buf(uint8_t *p) { return (p == nullptr) ? nullptr : (BufImpl*)p-1; } @@ -86,7 +86,7 @@ MBinBuffer::MBinBuffer(size_t preAlloc) BufImpl *p = (BufImpl *)mir_alloc(sizeof(BufImpl) + preAlloc); p->lockCount = 1; p->size = (unsigned)preAlloc; - m_buf = (char*)(p + 1); + m_buf = (uint8_t *)(p + 1); } MBinBuffer& MBinBuffer::operator=(MBinBuffer &&from) noexcept @@ -108,7 +108,7 @@ void MBinBuffer::append(const void *pBuf, size_t bufLen) BufImpl *p = ptr2buf(m_buf)->realloc(bufLen); if (p) { - m_buf = (char*)(p + 1); + m_buf = (uint8_t *)(p + 1); memcpy(m_buf + p->size, pBuf, bufLen); p->size += (unsigned)bufLen; } @@ -122,7 +122,7 @@ void MBinBuffer::appendBefore(const void *pBuf, size_t bufLen) BufImpl *p = ptr2buf(m_buf)->realloc(bufLen); if (p) { - m_buf = (char *)(p + 1); + m_buf = (uint8_t *)(p + 1); memmove(m_buf + bufLen, m_buf, p->size); memcpy(m_buf, pBuf, bufLen); p->size += (unsigned)bufLen; @@ -138,7 +138,7 @@ void MBinBuffer::assign(const void *pBuf, size_t bufLen) BufImpl *p = ptr2buf(m_buf)->alloc(bufLen); if (p) { p->size = (unsigned)bufLen; - m_buf = (char *)(p + 1); + m_buf = (uint8_t *)(p + 1); memcpy(m_buf, pBuf, bufLen); } else m_buf = nullptr; diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 140837fef9..0b62e5dcda 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -994,7 +994,7 @@ CallFunctionSync @1170 ??4MBinBuffer@@QAEAAV0@$$QAV0@@Z @1208 NONAME
?append@MBinBuffer@@QAEXPBXI@Z @1209 NONAME
?appendBefore@MBinBuffer@@QAEXPBXI@Z @1210 NONAME
-?data@MBinBuffer@@QBEPADXZ @1211 NONAME
+?data@MBinBuffer@@QBEPAEXZ @1211 NONAME
?isEmpty@MBinBuffer@@QBE_NXZ @1212 NONAME
?length@MBinBuffer@@QBEIXZ @1213 NONAME
?remove@MBinBuffer@@QAEXI@Z @1214 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index bf5cb32785..e7da28b523 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -994,7 +994,7 @@ CallFunctionSync @1170 ??4MBinBuffer@@QEAAAEAV0@$$QEAV0@@Z @1208 NONAME
?append@MBinBuffer@@QEAAXPEBX_K@Z @1209 NONAME
?appendBefore@MBinBuffer@@QEAAXPEBX_K@Z @1210 NONAME
-?data@MBinBuffer@@QEBAPEADXZ @1211 NONAME
+?data@MBinBuffer@@QEBAPEAEXZ @1211 NONAME
?isEmpty@MBinBuffer@@QEBA_NXZ @1212 NONAME
?length@MBinBuffer@@QEBA_KXZ @1213 NONAME
?remove@MBinBuffer@@QEAAX_K@Z @1214 NONAME
|