2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Parser needs user_shost for the %h escape in @include expansion.

Fixes oss-fuzz issue #30238
This commit is contained in:
Todd C. Miller
2021-02-03 08:56:32 -07:00
parent bde4411867
commit e66b132d76

View File

@@ -49,6 +49,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
if (sudoersin == NULL)
return 0;
/* Parser needs user_shost for the %h escape in @include expansion. */
user_host = user_shost = "localhost";
/* Initialize defaults and parse sudoers. */
init_defaults();
init_parser("sudoers", false, true);