8000 reduce string value limit by krypt0x · Pull Request #258 · ConcealNetwork/conceal-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

reduce string value limit #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.0)

include(CheckCXXCompilerFlag)
set(VERSION "6.5.2")
set(VERSION_BUILD_NO "Endovelicus")
set(VERSION "6.6.0")
set(VERSION_BUILD_NO "Ataegina")
# Packaged from main commits
set(COMMIT 72946d9)
set(REFS " (HEAD -> master)")
Expand Down
5 changes: 3 additions & 2 deletions src/Serialization/BinaryInputStreamSerializer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2021 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -39,7 +40,7 @@ void BinaryInputStreamSerializer::endObject() {
bool BinaryInputStreamSerializer::beginArray(size_t& size, common::StringView name) {
readVarintAs<uint64_t>(stream, size);

if (size > SIZE_MAX) {
if (size > 128*1024*1024) {
throw std::runtime_error("array size is too big");
}

Expand Down Expand Up @@ -93,7 +94,7 @@ bool BinaryInputStreamSerializer::operator()(std::string& value, common::StringV
uint64_t size;
readVarint(stream, size);

if (size > SIZE_MAX) {
if (size > 128*1024*1024) {
throw std::runtime_error("string size is too big");
} else if (size > 0) {
std::vector<char> temp;
Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/KVBinaryInputStreamSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ size_t readVarint(common::IInputStream& s) {

std::string readString(common::IInputStream& s) {
auto size = readVarint(s);
if (size > SIZE_MAX) {
if (size > 128*1024*1024) {
throw std::runtime_error("string size is too big");
}

Expand Down
0