← Commit list

58eb805c2

Denys Vlasenko
Denys Vlasenko
2018-08-05
SUCCESS Duration: 147s

Subject

ash: parser: Fix parsing of ${}

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/ash.c+3 -2
@@ -12431,7 +12431,7 @@ parsesub: {
STPUTC(c, out);
c = pgetc_eatbnl();
} while (isdigit(c));
- } else {
+ } else if (c != '}') {
/* $[{[#]]<specialchar>[}] */
int cc = c;
@@ -12457,7 +12457,8 @@ parsesub: {
}
USTPUTC(cc, out);
- }
+ } else
+ goto badsub;
if (c != '}' && subtype == VSLENGTH) {
/* ${#VAR didn't end with } */