From: rofu Date: Thu, 24 Dec 2009 07:28:19 +0000 (+0000) Subject: Change X-Git-Tag: v160~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63186c80fc72926f2b39b5aa63e6c3d18185641d;p=liblinear Change if(nrhs > 0 && nrhs < 5) to if(nrhs > 1 && nrhs < 5) in mexFunction to make sure accessing prhs[1] is legal. --- diff --git a/matlab/train.c b/matlab/train.c index 2a97feb..8a6b919 100644 --- a/matlab/train.c +++ b/matlab/train.c @@ -283,7 +283,7 @@ void mexFunction( int nlhs, mxArray *plhs[], srand(1); // Transform the input Matrix to libsvm format - if(nrhs > 0 && nrhs < 5) + if(nrhs > 1 && nrhs < 5) { int err=0;