[git/master] VisItBridge GMVReader's gmvread.c: stack smashing while parsing file with polygonal data
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Take the attached sample ASCII GMV file "gmvtest.inp" that traditionally shipped with GMV binaries since February 2000, append file extension ".gmv".
ParaView 3.98.0-RC1, Debug build for Windows 64bit with VS2008
Load "gmvtest.inp.gmv" by means of the VisItBridge GMVReader.
=> VS2008 raises dialog "Run-Time Check Failure #2 - Stack around the variable 'varname' was corrupted.", at the end of readpolygons() in gmvread.c.
Reason behind is character array "varname" has fixed length 5, while the keyword that ends polygonal data definition, "endpoly" (that is read into "varname" via scanf()), has length 7+1.