Skip to content
Snippets Groups Projects
Commit 01c73075 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Use failsafe wrappers.

parent 09513b82
No related branches found
No related tags found
2 merge requests!91Add alternative code path for huge buffers.,!89Miscellaneous fixes and CDI-PIO improvements
......@@ -802,7 +802,7 @@ zaxis_compare(int zaxisID, int zaxistype, int nlevels, const double *levels, con
if (!differ && hasBounds)
{
double *bounds = (double *) malloc(2 * nlevels * sizeof(double));
double *bounds = Malloc(2 * (size_t)nlevels * sizeof(double));
zaxisInqLbounds(zaxisID, bounds);
zaxisInqUbounds(zaxisID, bounds + nlevels);
for (int levelID = 0; levelID < nlevels; levelID++)
......@@ -814,7 +814,7 @@ zaxis_compare(int zaxisID, int zaxistype, int nlevels, const double *levels, con
break;
}
}
free(bounds);
Free(bounds);
}
if (!differ)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment