Skip to content

Commit

Permalink
Fix buffer overrun bug in CPU upsample op (#1501) (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharans29 authored and pranavsharma committed Jul 26, 2019
1 parent 6df4bc2 commit 36469ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cpu/tensor/upsample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Status Upsample<T>::BaseCompute(OpKernelContext* context, const std::vector<floa
Tensor* Y = context->Output(0, Y_dims);

if (no_scale) {
memcpy(Y->MutableDataRaw(), X->DataRaw(), Y->Size() * sizeof(T));
memcpy(Y->MutableDataRaw(), X->DataRaw(), Y->Size());
return Status::OK();
}

Expand Down

0 comments on commit 36469ba

Please sign in to comment.