Use sudo_strtonum() explicitly instead of via a macro.

This commit is contained in:
Todd C. Miller
2019-10-14 10:09:30 -06:00
parent 04a17095be
commit 2512f6efbf
23 changed files with 55 additions and 46 deletions

View File

@@ -39,6 +39,7 @@
#endif
#include "sudo_compat.h"
#include "sudo_util.h"
#include "pathnames.h"
#ifndef _POSIX_OPEN_MAX
@@ -116,7 +117,7 @@ sudo_closefrom(int lowfd)
struct dirent *dent;
while ((dent = readdir(dirp)) != NULL) {
const char *errstr;
int fd = strtonum(dent->d_name, lowfd, INT_MAX, &errstr);
int fd = sudo_strtonum(dent->d_name, lowfd, INT_MAX, &errstr);
if (errstr == NULL && fd != dirfd(dirp)) {
# ifdef __APPLE__
/* Avoid potential libdispatch crash when we close its fds. */