summarylogtreecommitdiffstats
path: root/protobuf-3.20.diff
diff options
context:
space:
mode:
Diffstat (limited to 'protobuf-3.20.diff')
-rw-r--r--protobuf-3.20.diff13
1 files changed, 13 insertions, 0 deletions
diff --git a/protobuf-3.20.diff b/protobuf-3.20.diff
new file mode 100644
index 000000000000..908f06e14105
--- /dev/null
+++ b/protobuf-3.20.diff
@@ -0,0 +1,13 @@
+diff --git a/onnxruntime/core/framework/tensorprotoutils.cc b/onnxruntime/core/framework/tensorprotoutils.cc
+index 085c1ffbe..a9070d5e4 100644
+--- a/onnxruntime/core/framework/tensorprotoutils.cc
++++ b/onnxruntime/core/framework/tensorprotoutils.cc
+@@ -256,7 +256,7 @@ Status UnpackTensor(const ONNX_NAMESPACE::TensorProto& tensor, const void* raw_d
+ ") does not match the data size(", tensor.field_size(), ") in proto"); \
+ auto& data = tensor.field_name(); \
+ for (auto data_iter = data.cbegin(); data_iter != data.cend(); ++data_iter) \
+- *p_data++ = *reinterpret_cast<const T*>(data_iter); \
++ *p_data++ = *data_iter; \
+ return Status::OK(); \
+ }
+