Skip to content

Commit

Permalink
Add check for sysconf(_SC_PAGESIZE) failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
millert committed Jan 1, 2024
1 parent f52fa57 commit 0045247
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/util/regress/mktemp/mktemp_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ main(int argc, char *argv[])
argv += optind;

pg = (size_t)sysconf(_SC_PAGESIZE);
if (pg == (size_t)-1)
sudo_fatal("sysconf(_SC_PAGESIZE)");
if (getcwd(cwd, sizeof cwd - 1) == NULL)
sudo_fatal("getcwd");
clen = strlen(cwd);
Expand Down

0 comments on commit 0045247

Please # to comment.