ownWeights() in WeightsContext.cpp allocates by tensor shape but copies
by raw data size. A model with shape=[1] (4 bytes) and 4000 bytes of raw
data causes a 3996-byte heap overflow.import tensorrt as trt
parser = trt.OnnxParser(network, logger)
parser.parse_from_file("tensorrt_heap_overflow.onnx")
# heap overflow in ownWeights