Open ax3l opened 2 years ago
Some quick grepping leads to
Dataset.cpp: char maxInfoV[Amrvis::LINELENGTH], minInfoV[Amrvis::LINELENGTH];
Which leads to:
./amrex/Src/Extern/amrdata/AMReX_AmrvisConstants.H:const int LINELENGTH = 160;
I guess we cannot just change LINELENGTH because it affects how AMRDATA behaves. (see amrex/Extern/amrdata/AMReX_AmrData.cpp
. I will ask wiser people.
Jup, it's basically writing a string added to a prefix in a same-size string a couple of time.
I would say we trash the C pointer logic and make it C++? :)
Yes, there are quite some C strings and sprintf's that should be replaced with C++ strings.
@WeiqunZhang can you please take a look at https://github.com/AMReX-Codes/amrex/pull/2660 ? :) That one I do not immediately get, the other things I fixed now in Amrvis.
Spotted buffer overflows in
sprintf
with GCC 10.3.X-ref: ignores https://github.com/AMReX-Codes/amrex/issues/2750 for now (can be a separate PR)