File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1- // Copyright 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+ // Copyright 2024-2025 , NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22//
33// Redistribution and use in source and binary forms, with or without
44// modification, are permitted provided that the following conditions
@@ -72,6 +72,11 @@ ShapeTensor::SetDataFromBuffer(
7272 *reinterpret_cast <int64_t *>(data_.get ()) =
7373 static_cast <int64_t >(total_batch_size);
7474 }
75+ if (size_ < datatype_size) {
76+ return TRITONSERVER_ErrorNew (
77+ TRITONSERVER_ERROR_INVALID_ARG,
78+ " Unexpected integer underflow while calculating shape tensor size." );
79+ }
7580 std::memcpy (
7681 data_.get () + datatype_size, data_buffer, size_ - datatype_size);
7782 } else {
You can’t perform that action at this time.
0 commit comments