Skip to content

Commit bfd2340

Browse files
authored
Merge pull request #254 from wegank/non-shape-pos-fix
Fix heap overflow on computing parametrizations in non-shape-position case
2 parents 44fbc68 + c1bf178 commit bfd2340

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/fglm/fglm_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ int compute_parametrizations_non_shape_position_case(param_t *param,
12801280
}
12811281
else{
12821282
nmod_poly_fit_length(param->coords[nvars-2-nc],
1283-
param->elim->length-1 );
1283+
FLINT_MAX(2, param->elim->length-1) );
12841284
param->coords[nvars-2-nc]->length = data_bms->BMS->R1->length ;
12851285
param->coords[nvars-2-nc]->coeffs[0] = 0;
12861286
param->coords[nvars-2-nc]->coeffs[1] = 0;

0 commit comments

Comments
 (0)