Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add extra check on vector size to prevent segfault
  • Loading branch information
mattdawkins committed Aug 27, 2015
commit 7a0797af6ce1dfaf04ab7d27b0f944895af32946
1 change: 1 addition & 0 deletions src/caffe/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ template <typename Dtype>
const vector<Blob<Dtype>*>& Net<Dtype>::Forward(
const vector<Blob<Dtype>*> & bottom, Dtype* loss) {
// Copy bottom to internal bottom
CHECK_LE(bottom.size(), net_input_blobs_.size());
for (int i = 0; i < bottom.size(); ++i) {
net_input_blobs_[i]->CopyFrom(*bottom[i]);
}
Expand Down