Use non-exiting allocators in the parser (much of it already did).

This commit is contained in:
Todd C. Miller
2015-05-27 10:36:03 -06:00
parent 6b7be032af
commit 4da9e10971
6 changed files with 658 additions and 288 deletions

View File

@@ -127,7 +127,11 @@ alias_add(char *name, int type, struct member *members)
struct alias *a;
debug_decl(alias_add, SUDOERS_DEBUG_ALIAS)
a = sudo_ecalloc(1, sizeof(*a));
a = calloc(1, sizeof(*a));
if (a == NULL) {
strlcpy(errbuf, N_("unable to allocate memory"), sizeof(errbuf));
debug_return_str(errbuf);
}
a->name = name;
a->type = type;
/* a->used = false; */