diff --git a/tc/normal.c b/tc/normal.c index 6ec2600a..e6683db8 100644 --- a/tc/normal.c +++ b/tc/normal.c @@ -26,7 +26,7 @@ main(int argc, char **argv) double x, *table; int i, n; - table = calloc(sizeof(double), TABLESIZE); + table = calloc(sizeof(double), TABLESIZE+1); if (!table) { fprintf(stderr, "Not enough memory\n"); return 1; diff --git a/tc/paretonormal.c b/tc/paretonormal.c index b5ce9152..c793df6d 100644 --- a/tc/paretonormal.c +++ b/tc/paretonormal.c @@ -54,7 +54,7 @@ main(int argc, char **argv) double *table; int i,n; - table = calloc(TABLESIZE, sizeof(double)); + table = calloc(TABLESIZE+1, sizeof(double)); if (!table) { fprintf(stderr, "Out of memory!\n"); exit(1);