File: protobuf.patch

package info (click to toggle)
zbackup 1.5-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 828 kB
  • sloc: cpp: 6,957; ansic: 468; python: 207; makefile: 10
file content (28 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: second prameter is no op for SetTotalBytesLimit()
 This function signature was even removed.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Forwarded: no
Last-Update: 2022-06-06

---

--- zbackup-1.5.orig/backup_restorer.cc
+++ zbackup-1.5/backup_restorer.cc
@@ -48,7 +48,7 @@ void restore( ChunkStorage::Reader & chu
   // 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;
@@ -150,7 +150,7 @@ public:
     // 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() );
   }
 
   ~BackupInstructionsIterator()