Skip to content

Commit 0128fa0

Browse files
committed
Fix heap overflow on computing parametrizations in non-shape-position case
1 parent f72bc6c commit 0128fa0

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
@@ -1282,7 +1282,7 @@ int compute_parametrizations_non_shape_position_case(param_t *param,
12821282
}
12831283
else{
12841284
nmod_poly_fit_length(param->coords[nvars-2-nc],
1285-
param->elim->length-1 );
1285+
FLINT_MAX(2, param->elim->length-1) );
12861286
param->coords[nvars-2-nc]->length = data_bms->BMS->R1->length ;
12871287
param->coords[nvars-2-nc]->coeffs[0] = 0;
12881288
param->coords[nvars-2-nc]->coeffs[1] = 0;

0 commit comments

Comments
 (0)