X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmisc%2Fwordexp.c;h=34fc900ac73e3ea928f111ecc098f1b15036eed2;hp=4a3efc7bc40a83d055bb1f4d952e6b70b2d4893c;hb=bef7a85e45ccc4b40958ca6d94894ca0d27e8291;hpb=f007bb854b0b2d2d12cd45a8feb674fa9abe70b2 diff --git a/src/misc/wordexp.c b/src/misc/wordexp.c index 4a3efc7b..34fc900a 100644 --- a/src/misc/wordexp.c +++ b/src/misc/wordexp.c @@ -82,6 +82,8 @@ static int do_wordexp(const char *s, wordexp_t *we, int flags) 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;