*** util/dexpire.c.old Tue Apr 13 02:20:42 1999 --- util/dexpire.c Tue Apr 13 02:20:11 1999 *************** *** 161,164 **** --- 161,168 ---- char **dary = malloc(daryMax * sizeof(char *)); + if (!dary) { + fprintf(stderr, "unable to malloc in removal scan\n"); + exit(1); + } if (chdir(PatExpand(SpoolHomePat)) != 0) { fprintf(stderr, "Unable to chdir(%s)\n", PatExpand(SpoolHomePat)); *************** *** 182,187 **** --- 186,199 ---- daryMax = daryMax * 2; dary = realloc(dary, daryMax * sizeof(char *)); + if (!dary) { + fprintf(stderr, "unable to realloc in scan for queue dirs\n"); + exit(1); + } } dary[daryIdx] = malloc(strlen(den->d_name) + 1); + if (!dary[daryIdx]) { + fprintf(stderr, "unable to malloc in scan for queue dirs\n"); + exit(1); + } strcpy(dary[daryIdx], den->d_name); ++daryIdx; *************** *** 491,494 **** --- 503,510 ---- if (createMe) { node = malloc(sizeof(ENode) + strlen(path) + 1); + if (!node) { + fprintf(stderr, "unable to malloc in FindNode\n"); + exit(1); + } node->no_Next = NULL; node->no_Path = (char *)(node + 1); *** util/dspoolout.c.old Tue Apr 13 02:03:21 1999 --- util/dspoolout.c Tue Apr 13 02:12:11 1999 *************** *** 589,592 **** --- 589,596 ---- DNode *node = malloc(sizeof(Node) + strlen(name) + 1); + if (!node) { + fprintf(stderr, "unable to malloc in AddNode\n"); + exit(1); + } node->no_Next = Base; node->no_SpoolFile = (char *)(node + 1);