libkmod-config: more chars allowed as space
PATCH 1/1 libkmod-config: more chars allowed as space
Recently in a discussion I noticed that kernel allows more chars to be considered as space in the kernel command line. Switch to the equivalent of isspace() instead of considering only ' '.
--- libkmod/libkmod-config.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
libkmod/libkmod-config.c +5 -2
@@ -543,11 +543,14 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)break ;case '\0' : -case '\n' : -/* Stop iterating on new chars */ iter = false;/* fall-through */ case ' ' : +case '\n' : +case '\t' : +case '\v' : +case '\f' : +case '\r' :if (is_quoted && state ==STATE_VALUE ) {/* no state change*/ ; }else if (is_quoted) {
Signature · 1 line
2.30.1
Lucas De Marchi
AppliedQuoted 4 lines · Lucas De Marchi
Recently in a discussion I noticed that kernel allows more chars to be considered as space in the kernel command line. Switch to the equivalent of
isspace()instead of considering only ' '.
Applied,
Lucas De Marchi
Quoted 28 lines
--- libkmod/libkmod-config.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)libkmod/libkmod-config.c +5
-3@@ -543,11 +543,14 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)break ;case '\0' : -case '\n' : -/* Stop iterating on new chars */ iter = false;/* fall-through */ case ' ' : +case '\n' : +case '\t' : +case '\v' : +case '\f' : +case '\r' :if (is_quoted && state ==STATE_VALUE ) {/* no state change*/ ; }else if (is_quoted) { --2.30.1