vcpkg/ports/opencv3/0011-fix-caffe-io.patch
Stefano Sinigardi 6a398a2b9b
[OpenCV3] fix build with latest protobuf (#20301)
* [OpenCV3] fix compatibility with latest protobuf

* [OpenCV3] fix references
2021-09-24 10:48:01 -07:00

12 lines
490 B
Diff

--- a/modules/dnn/src/caffe/caffe_io.cpp
+++ b/modules/dnn/src/caffe/caffe_io.cpp
@@ -1111,7 +1111,7 @@ static const int kProtoReadBytesLimit = INT_MAX; // Max size of 2 GB minus 1 by
bool ReadProtoFromBinary(ZeroCopyInputStream* input, Message *proto) {
CodedInputStream coded_input(input);
- coded_input.SetTotalBytesLimit(kProtoReadBytesLimit, 536870912);
+ coded_input.SetTotalBytesLimit(kProtoReadBytesLimit);
return proto->ParseFromCodedStream(&coded_input);
}