From bc541951990f5de7112743463c9aa7f32528811b Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 6 Jun 2012 10:10:48 +0000 Subject: [PATCH] decreased size of the buffer used in CvBoost::update_weights (ticket #1803) --- modules/ml/src/boost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ml/src/boost.cpp b/modules/ml/src/boost.cpp index 3d938c7408..ff7120c115 100644 --- a/modules/ml/src/boost.cpp +++ b/modules/ml/src/boost.cpp @@ -1132,7 +1132,7 @@ CvBoost::update_weights( CvBoostTree* tree ) else { if( have_subsample ) - _buf_size += data->buf->step*(sizeof(float)+sizeof(uchar)); + _buf_size += data->buf->cols*(sizeof(float)+sizeof(uchar)); } inn_buf.allocate(_buf_size); uchar* cur_buf_pos = (uchar*)inn_buf;