1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Logs and size limits for incoming queries in FullNodeShard (#601)

* Log incoming queries in FullNodeShard

* Limit size for some queries in FullNodeShard
This commit is contained in:
SpyCheese 2023-02-02 07:04:19 +00:00 committed by GitHub
parent 3b3c25b654
commit 1e4eecfdb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 78 additions and 34 deletions

View file

@ -60,7 +60,7 @@ Result<T> read_file_impl(CSlice path, int64 size, int64 offset) {
if (size == -1) {
size = file_size - offset;
} else if (size >= 0) {
if (size + offset > file_size) {
if (size > file_size - offset) {
size = file_size - offset;
}
}