Skip to content

Commit f067d2f

Browse files
authored
Merge pull request #81 from gap-packages/mh/fix-out-of-bounds-access
Fix out of bounds access in the C code
2 parents eba8249 + 2711a80 commit f067d2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/leon/src/stcs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static BOOLEAN checkStabilizer(
461461
(wh.word.length + symmetricWordLength(&wh.word));
462462
if ( relatorPriority > selectionPriority ) {
463463
newRel = addRelatorSortedFromWord( G, &wh.word, TRUE, TRUE);
464-
selectionPriority += relatorSelection[4];
464+
selectionPriority += relatorSelection[3];
465465
++numberSelected;
466466
totalSelectedLength += newRel->length;
467467
numberAdded = addOccurencesForRelator( newRel,
@@ -470,7 +470,7 @@ static BOOLEAN checkStabilizer(
470470
traceNewRelator( G, level, deductionQueue, newRel);
471471
}
472472
else
473-
selectionPriority -= relatorSelection[5];
473+
selectionPriority -= relatorSelection[4];
474474
++numberOfRelators;
475475
totalRelatorLength += wh.word.length;
476476
maxRelatorLength = MAX ( maxRelatorLength, wh.word.length);
@@ -640,7 +640,7 @@ static BOOLEAN xCheckStabilizer(
640640
((*wPtr)->length + symmetricWordLength(*wPtr));
641641
if ( relatorPriority > selectionPriority ) {
642642
newRel = addRelatorSortedFromWord( G, *wPtr, TRUE, TRUE);
643-
selectionPriority += relatorSelection[4];
643+
selectionPriority += relatorSelection[3];
644644
++numberSelected;
645645
totalSelectedLength += newRel->length;
646646
numberAdded = addOccurencesForRelator( newRel,
@@ -649,7 +649,7 @@ static BOOLEAN xCheckStabilizer(
649649
traceNewRelator( G, level, deductionQueue, newRel);
650650
}
651651
else
652-
selectionPriority -= relatorSelection[5];
652+
selectionPriority -= relatorSelection[4];
653653
++numberOfRelators;
654654
totalRelatorLength += (*wPtr)->length;
655655
maxRelatorLength = MAX ( maxRelatorLength, (*wPtr)->length);

0 commit comments

Comments
 (0)