ash: use glob() from libc
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 21 Sep 2016 14:25:58 +0000 (16:25 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 21 Sep 2016 14:25:58 +0000 (16:25 +0200)
commitb3f29b452a660a7293162897424bed205f7f9147
treebd334b845e1affd68620bcffe60c3e6381606958
parentd8330ca4a42a7f5d81b233a1cf7cbc7a7bd0be95
ash: use glob() from libc

Adapted from dash.
The "homegrown" glob code is retained (ifdef'ed out).
This changes was inspired by bug 9261, which detected out-of bounds use of heap
for 2098 byte long name in the "homegrown" code. This is still not fixed...

function                                             old     new   delta
expandarg                                            960     982     +22
static.syntax_index_table                             26      25      -1
static.spec_symbls                                    27      26      -1
static.metachars                                       4       -      -4
addfname                                              42       -     -42
msort                                                126       -    -126
expmeta                                              528       -    -528
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 1/2 up/down: 22/-702)          Total: -680 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c