← Commit list

7bc3d3969

Denys Vlasenko
Denys Vlasenko
2016-09-17
SUCCESS Duration: 257s

Subject

ash: add a FIXME for bug 9246

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+9 -0
@@ -11659,9 +11659,18 @@ parsebackq: {
str = NULL;
savelen = out - (char *)stackblock();
if (savelen > 0) {
+ /*
+ * FIXME: this can allocate very large block on stack and SEGV.
+ * Example:
+ * echo "..<100kbytes>..`true` $(true) `true` ..."
+ * alocates 100kb for every command subst. With about
+ * a hundred command substitutions stack overflows.
+ * With larger prepended string, SEGV happens sooner.
+ */
str = alloca(savelen);
memcpy(str, stackblock(), savelen);
}
+
if (oldstyle) {
/* We must read until the closing backquote, giving special
* treatment to some slashes, and then push the string and