ratan203 / sofia-ml

Automatically exported from code.google.com/p/sofia-ml
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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