Use non-exiting allocators in the redblack tree and fix the fallout.

Also switch to non-exiting allocators in affected code blocks.
This commit is contained in:
Todd C. Miller
2015-05-27 09:51:54 -06:00
parent 46770c9588
commit 2bf454b74d
12 changed files with 194 additions and 77 deletions

View File

@@ -587,8 +587,10 @@ sudoers_io_open(unsigned int version, sudo_conv_t conversation,
bindtextdomain("sudoers", LOCALEDIR);
sudo_setpwent();
sudo_setgrent();
if (sudo_setpwent() == -1 || sudo_setgrent() == -1) {
sudo_warnx(U_("unable to allocate memory"));
debug_return_int(-1);
}
/* Initialize the debug subsystem. */
for (cur = settings; *cur != NULL; cur++) {