zbackup/159.patch
2021-10-23 13:10:27 +02:00

22 lines
911 B
Diff

From b4ca95ac42ad5e0b491dc87d40f51c297b3a2eca Mon Sep 17 00:00:00 2001
From: Nipunn Koorapati <nipunn1313@gmail.com>
Date: Sat, 2 Oct 2021 11:49:18 -0700
Subject: [PATCH] Backport #158 - use one param when calling SetTotalBytesLimit
---
backup_restorer.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backup_restorer.cc b/backup_restorer.cc
index 3b83cd0..a4ab2d5 100644
--- a/backup_restorer.cc
+++ b/backup_restorer.cc
@@ -27,7 +27,7 @@ void restore( ChunkStorage::Reader & chunkStorageReader,
// TODO: this disables size checks for each separate message. Figure a better
// way to do this while keeping them enabled. It seems we need to create an
// instance of CodedInputStream for each message, but it might be expensive
- cis.SetTotalBytesLimit( backupData.size(), -1 );
+ cis.SetTotalBytesLimit( backupData.size() );
// Used when emitting chunks
string chunk;