Fix OOB access in LSET when opening a PCB file or updating from schematic.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18422
This commit is contained in:
Alex Shvartzkop
2024-07-23 01:41:01 +03:00
parent 559854ec0f
commit e2bd76bdce
4 changed files with 13 additions and 6 deletions
+3 -2
View File
@@ -41,14 +41,15 @@
LSET::LSET( std::initializer_list<PCB_LAYER_ID> aList ) :
BASE_SET()
LSET()
{
for( PCB_LAYER_ID layer : aList )
set( layer );
}
LSET::LSET( const LSEQ& aSeq )
LSET::LSET( const LSEQ& aSeq ) :
LSET()
{
for( PCB_LAYER_ID layer : aSeq )
set( layer );