mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 06:45:10 +00:00
Handle empty string and treat it as safe.
This commit is contained in:
@@ -68,6 +68,8 @@ safe_string(const char *str)
|
|||||||
|
|
||||||
/* Initial char must be <= 127 and not LF, CR, SPACE, ':', '<' */
|
/* Initial char must be <= 127 and not LF, CR, SPACE, ':', '<' */
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
case '\0':
|
||||||
|
debug_return_bool(true);
|
||||||
case '\n':
|
case '\n':
|
||||||
case '\r':
|
case '\r':
|
||||||
case ' ':
|
case ' ':
|
||||||
|
Reference in New Issue
Block a user