mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-29 19:04:31 +00:00
Size of an array is not a valid index.
components/esm4/reader.cpp:925:15: error: Out of bound access to memory after the end of 'sGroupType' [clang-analyzer-security.ArrayBound,-warnings-as-errors]
925 | ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
| ^
components/esm4/reader.cpp:627:13: note: Assuming field 'groupSize' is equal to field 'recHeaderSize'
627 | if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:627:9: note: Taking true branch
627 | if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
| ^
components/esm4/reader.cpp:634:17: note: Assuming the condition is true
634 | if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
| ^~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:634:13: note: Taking true branch
634 | if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
| ^
components/esm4/reader.cpp:638:17: note: Calling 'Reader::exitGroupCheck'
638 | exitGroupCheck();
| ^~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:13: note: Assuming the condition is false
650 | if (mCtx.groupStack.empty())
| ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:9: note: Taking false branch
650 | if (mCtx.groupStack.empty())
| ^
components/esm4/reader.cpp:655:16: note: Assuming 'lastGroupSize' is <= field 'second'
655 | while (mCtx.groupStack.back().second >= lastGroupSize)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:655:9: note: Loop condition is true. Entering loop body
655 | while (mCtx.groupStack.back().second >= lastGroupSize)
| ^
components/esm4/reader.cpp:663:17: note: Assuming 'overshoot' is <= 0
663 | if (overshoot > 0)
| ^~~~~~~~~~~~~
components/esm4/reader.cpp:663:13: note: Taking false branch
663 | if (overshoot > 0)
| ^
components/esm4/reader.cpp:676:17: note: Assuming the condition is false
676 | if (mCtx.groupStack.empty())
| ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:676:13: note: Taking false branch
676 | if (mCtx.groupStack.empty())
| ^
components/esm4/reader.cpp:682:17: note: Assuming 'lastGroupSize' is >= field 'second'
682 | if (lastGroupSize < mCtx.groupStack.back().second)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:682:13: note: Taking false branch
682 | if (lastGroupSize < mCtx.groupStack.back().second)
| ^
components/esm4/reader.cpp:686:17: note: Assuming 'lastGroupSize' is < field 'second'
686 | if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:686:13: note: Taking true branch
686 | if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
| ^
components/esm4/reader.cpp:687:30: note: Calling 'printLabel'
687 | std::cerr << printLabel(mCtx.groupStack.back().first.label, mCtx.groupStack.back().first.type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:925:15: note: Access of 'sGroupType' at index 12, while it holds only 12 'class std::basic_string_view<char>' elements
925 | ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|---|---|---|
| .. | ||
| actor.hpp | ||
| cellgrid.hpp | ||
| common.hpp | ||
| dialogue.hpp | ||
| effect.hpp | ||
| grid.hpp | ||
| grouptype.hpp | ||
| inventory.hpp | ||
| lighting.hpp | ||
| loadachr.cpp | ||
| loadachr.hpp | ||
| loadacti.cpp | ||
| loadacti.hpp | ||
| loadalch.cpp | ||
| loadalch.hpp | ||
| loadaloc.cpp | ||
| loadaloc.hpp | ||
| loadammo.cpp | ||
| loadammo.hpp | ||
| loadanio.cpp | ||
| loadanio.hpp | ||
| loadappa.cpp | ||
| loadappa.hpp | ||
| loadarma.cpp | ||
| loadarma.hpp | ||
| loadarmo.cpp | ||
| loadarmo.hpp | ||
| loadaspc.cpp | ||
| loadaspc.hpp | ||
| loadbook.cpp | ||
| loadbook.hpp | ||
| loadbptd.cpp | ||
| loadbptd.hpp | ||
| loadcell.cpp | ||
| loadcell.hpp | ||
| loadclas.cpp | ||
| loadclas.hpp | ||
| loadclfm.cpp | ||
| loadclfm.hpp | ||
| loadclot.cpp | ||
| loadclot.hpp | ||
| loadcont.cpp | ||
| loadcont.hpp | ||
| loadcrea.cpp | ||
| loadcrea.hpp | ||
| loaddial.cpp | ||
| loaddial.hpp | ||
| loaddobj.cpp | ||
| loaddobj.hpp | ||
| loaddoor.cpp | ||
| loaddoor.hpp | ||
| loadeyes.cpp | ||
| loadeyes.hpp | ||
| loadflor.cpp | ||
| loadflor.hpp | ||
| loadflst.cpp | ||
| loadflst.hpp | ||
| loadfurn.cpp | ||
| loadfurn.hpp | ||
| loadglob.cpp | ||
| loadglob.hpp | ||
| loadgmst.cpp | ||
| loadgmst.hpp | ||
| loadgras.cpp | ||
| loadgras.hpp | ||
| loadgrup.hpp | ||
| loadhair.cpp | ||
| loadhair.hpp | ||
| loadhdpt.cpp | ||
| loadhdpt.hpp | ||
| loadidle.cpp | ||
| loadidle.hpp | ||
| loadidlm.cpp | ||
| loadidlm.hpp | ||
| loadimod.cpp | ||
| loadimod.hpp | ||
| loadinfo.cpp | ||
| loadinfo.hpp | ||
| loadingr.cpp | ||
| loadingr.hpp | ||
| loadkeym.cpp | ||
| loadkeym.hpp | ||
| loadland.cpp | ||
| loadland.hpp | ||
| loadlgtm.cpp | ||
| loadlgtm.hpp | ||
| loadligh.cpp | ||
| loadligh.hpp | ||
| loadltex.cpp | ||
| loadltex.hpp | ||
| loadlvlc.cpp | ||
| loadlvlc.hpp | ||
| loadlvli.cpp | ||
| loadlvli.hpp | ||
| loadlvln.cpp | ||
| loadlvln.hpp | ||
| loadmato.cpp | ||
| loadmato.hpp | ||
| loadmisc.cpp | ||
| loadmisc.hpp | ||
| loadmset.cpp | ||
| loadmset.hpp | ||
| loadmstt.cpp | ||
| loadmstt.hpp | ||
| loadmusc.cpp | ||
| loadmusc.hpp | ||
| loadnavi.cpp | ||
| loadnavi.hpp | ||
| loadnavm.cpp | ||
| loadnavm.hpp | ||
| loadnote.cpp | ||
| loadnote.hpp | ||
| loadnpc.cpp | ||
| loadnpc.hpp | ||
| loadotft.cpp | ||
| loadotft.hpp | ||
| loadpack.cpp | ||
| loadpack.hpp | ||
| loadpgrd.cpp | ||
| loadpgrd.hpp | ||
| loadpgre.cpp | ||
| loadpgre.hpp | ||
| loadpwat.cpp | ||
| loadpwat.hpp | ||
| loadqust.cpp | ||
| loadqust.hpp | ||
| loadrace.cpp | ||
| loadrace.hpp | ||
| loadrefr.cpp | ||
| loadrefr.hpp | ||
| loadregn.cpp | ||
| loadregn.hpp | ||
| loadroad.cpp | ||
| loadroad.hpp | ||
| loadsbsp.cpp | ||
| loadsbsp.hpp | ||
| loadscol.cpp | ||
| loadscol.hpp | ||
| loadscpt.cpp | ||
| loadscpt.hpp | ||
| loadscrl.cpp | ||
| loadscrl.hpp | ||
| loadsgst.cpp | ||
| loadsgst.hpp | ||
| loadslgm.cpp | ||
| loadslgm.hpp | ||
| loadsndr.cpp | ||
| loadsndr.hpp | ||
| loadsoun.cpp | ||
| loadsoun.hpp | ||
| loadstat.cpp | ||
| loadstat.hpp | ||
| loadtact.cpp | ||
| loadtact.hpp | ||
| loadterm.cpp | ||
| loadterm.hpp | ||
| loadtes4.cpp | ||
| loadtes4.hpp | ||
| loadtree.cpp | ||
| loadtree.hpp | ||
| loadtxst.cpp | ||
| loadtxst.hpp | ||
| loadweap.cpp | ||
| loadweap.hpp | ||
| loadwrld.cpp | ||
| loadwrld.hpp | ||
| magiceffectid.hpp | ||
| reader.cpp | ||
| reader.hpp | ||
| readerutils.hpp | ||
| records.hpp | ||
| reference.hpp | ||
| script.hpp | ||
| typetraits.hpp | ||
| vertex.hpp | ||