qorelanguage / qore

Qore Programming Language
GNU General Public License v2.0
58 stars 10 forks source link

Possible printout random memory content in reflection module #4857

Closed niclasr closed 7 months ago

niclasr commented 8 months ago

GCC is warning that typestr maybe used uninitialized in QoreReflectionMethod::setType in modules/reflection/src/QC_AbstractMethod.qpp . typestr is set in the switch(type) but it does not list all possible enum values for method_type_e, so MT_Pseudo would cause a possible random printout. It also does not set a value for the default case, GCC still warns that typestr can be used uninitialized even if all enum values are listed.

davidnich commented 7 months ago

should be fixed now - I did not get any warnings with gcc 13 for example