alexhock / sofia-ml

Automatically exported from code.google.com/p/sofia-ml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sf-sparse-vector.cc bug, in Init function

GoogleCodeExporter opened this issue · comments

Make all_test, then find an error occured white testing sf-sparse-vector_test, 
assertion assert(x1.GetGroupId() == "2"); failed at line 27 of file 
sf-sparse-vector_test.cc.

Solution. Add a line "group_id_c_string[end - position]=0;" in 
sf-sparse-vector.cc line 145. cause string generated by strncpy is not always 
'\0' terminated.


Original issue reported on code.google.com by starshin...@gmail.com on 5 Nov 2012 at 4:22

Have a fix in place for this now.  Will upload new version of source in a few 
days.

Original comment by dscul...@google.com on 30 Dec 2013 at 8:31