Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch a case where nodes with very close to zero values created an infinite alloc loop. #8388

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/gmt_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -2646,11 +2646,10 @@ GMT_LOCAL uint64_t gmtsupport_trace_contour (struct GMT_CTRL *GMT, struct GMT_GR
n_nan++;
continue;
}

/* Skip if no zero-crossing on this edge */

if (z[this_side+1] * z[this_side] > 0.0f) continue;
if ((dz = z[this_side] - z[this_side+1]) == 0.0f) continue;
if (fabs((dz = z[this_side] - z[this_side+1])) < 1e-10) continue;

/* Save normalized distance along edge from corner this_side to crossing of edge this_side */

Expand Down
Loading