Skip to content

Commit

Permalink
[GR] Fix possible buffer overflow in the contour routine
Browse files Browse the repository at this point in the history
  • Loading branch information
IngoMeyer441 committed Oct 29, 2024
1 parent cf08670 commit 32b12cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/gr/contour.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ static void gradient(int ind, int n, double *xpts, double *ypts, enum contour_op
if (i == txpt)
{
t = typt - j;
j++;
if (j < contour_vars.ydim - 1) j++;
}
else
{
t = txpt - i;
i++;
if (i < contour_vars.xdim - 1) i++;
}

if (i == 0)
Expand Down

0 comments on commit 32b12cc

Please sign in to comment.