We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40217ea commit 8a40a50Copy full SHA for 8a40a50
1 file changed
plugins/sudoers/auth/rfc1938.c
@@ -72,7 +72,7 @@ sudo_rfc1938_setup(const struct sudoers_context *ctx, struct passwd *pw,
72
op_len = strlen(orig_prompt);
73
74
/* Ignore trailing colon (we will add our own) */
75
- if (orig_prompt[op_len - 1] == ':')
+ if (op_len > 0 && orig_prompt[op_len - 1] == ':')
76
op_len--;
77
else if (op_len >= 2 && orig_prompt[op_len - 1] == ' '
78
&& orig_prompt[op_len - 2] == ':')
0 commit comments