← Commit list

00bd76728

Denys Vlasenko
Denys Vlasenko
2018-04-06
SUCCESS Duration: 152s

Subject

hush: if we did match "LINENO" or "OPTIND", stop further comparisons

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/hush.c+6 -2
@@ -2134,12 +2134,16 @@ static void handle_changed_special_names(const char *name, unsigned name_len)
&& name_len == 6
) {
#if ENABLE_HUSH_LINENO_VAR
- if (strncmp(name, "LINENO", 6) == 0)
+ if (strncmp(name, "LINENO", 6) == 0) {
G.lineno_var = NULL;
+ return;
+ }
#endif
#if ENABLE_HUSH_GETOPTS
- if (strncmp(name, "OPTIND", 6) == 0)
+ if (strncmp(name, "OPTIND", 6) == 0) {
G.getopt_count = 0;
+ return;
+ }
#endif
}
}