Skip to content

Commit

Permalink
Fix wrong reallocation (segfault when xtmax==0 with very few memory).
Browse files Browse the repository at this point in the history
  • Loading branch information
Algiane committed Aug 8, 2024
1 parent f270849 commit aab36e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zaldy_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ int PMMG_setMeshSize_realloc( MMG5_pMesh mesh,int npmax_old,int xpmax_old,
"adja array", return 0);
}

if ( !nemax_old )
if ( !xtmax_old )
PMMG_CALLOC(mesh, mesh->xtetra, mesh->xtmax+1, MMG5_xTetra,

Check warning on line 343 in src/zaldy_pmmg.c

View check run for this annotation

Codecov / codecov/patch

src/zaldy_pmmg.c#L343

Added line #L343 was not covered by tests
"boundary tetra array", return 0);
else
Expand Down

0 comments on commit aab36e2

Please sign in to comment.