I'm not sure if it's legal for wordexp to modify this field, but this
is the only easy/straightforward fix, and applications should not
care. if it's an issue, i can work out a different (but more complex)
solution later.
if (we->we_offs > SIZE_MAX/sizeof(void *)/4)
return WRDE_NOSPACE;
i += we->we_offs;
if (we->we_offs > SIZE_MAX/sizeof(void *)/4)
return WRDE_NOSPACE;
i += we->we_offs;
+ } else {
+ we->we_offs = 0;
}
if (pipe(p) < 0) return WRDE_NOSPACE;
}
if (pipe(p) < 0) return WRDE_NOSPACE;