2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 05:48:18 +00:00

Fix off by one error in new SET_FLAG macro.

This commit is contained in:
Todd C. Miller 2016-01-20 15:09:32 -07:00
parent ec37504dfb
commit 5bae35c05c

View File

@ -596,7 +596,7 @@ command_info_to_details(char * const info[], struct command_details *details)
} }
#define SET_FLAG(s, n) \ #define SET_FLAG(s, n) \
if (strncmp(s, info[i], sizeof(s) - 1) == 0) { \ if (strncmp(s, info[i], sizeof(s) - 1) == 0) { \
switch (sudo_strtobool(info[i] + sizeof(s))) { \ switch (sudo_strtobool(info[i] + sizeof(s) - 1)) { \
case true: \ case true: \
SET(details->flags, n); \ SET(details->flags, n); \
break; \ break; \